@@ -866,6 +866,51 @@ forceIt(lastStatementResult);
866
866
}
867
867
` ;
868
868
869
+ exports [` String representation of objects with toReplString member calls toReplString: expectResult 1` ] = `
870
+ Object {
871
+ " alertResult" : Array [],
872
+ " code" : " const o = { toReplString: () => '<RUNE>' };
873
+ stringify (o );" ,
874
+ " displayResult" : Array [],
875
+ " errors" : Array [],
876
+ " parsedErrors" : " " ,
877
+ " result" : " <RUNE>" ,
878
+ " resultStatus" : " finished" ,
879
+ " transpiled" : " const native = nativeStorage;
880
+ const forceIt = native .operators .get (\\" forceIt\\ " );
881
+ const callIfFuncAndRightArgs = native .operators .get (\\" callIfFuncAndRightArgs\\ " );
882
+ const boolOrErr = native .operators .get (\\" boolOrErr\\ " );
883
+ const wrap = native .operators .get (\\" wrap\\ " );
884
+ const unaryOp = native .operators .get (\\" unaryOp\\ " );
885
+ const binaryOp = native .operators .get (\\" binaryOp\\ " );
886
+ const throwIfTimeout = native .operators .get (\\" throwIfTimeout\\ " );
887
+ const setProp = native .operators .get (\\" setProp\\ " );
888
+ const getProp = native .operators .get (\\" getProp\\ " );
889
+ let lastStatementResult = undefined ;
890
+ const globals = native .globals ;
891
+ {
892
+ {
893
+ const o = {
894
+ toReplString: wrap (() => ({
895
+ isTail: false ,
896
+ value: ' <RUNE>'
897
+ }), \\" () => '<RUNE>'\\ " , native )
898
+ };
899
+ lastStatementResult = eval (\\" callIfFuncAndRightArgs(stringify, 2, 0, o);\\ " );
900
+ globals .variables .set (\\" o\\ " , {
901
+ kind: \\" const\\ " ,
902
+ getValue : () => {
903
+ return o ;
904
+ }
905
+ });
906
+ }
907
+ }
908
+ forceIt(lastStatementResult);
909
+ ",
910
+ "visualiseListResult": Array [],
911
+ }
912
+ ` ;
913
+
869
914
exports [` String representation of strings are nice: expectResult 1` ] = `
870
915
Object {
871
916
" alertResult" : Array [],
0 commit comments