Messing with tests

This commit is contained in:
2023-08-28 22:44:32 +10:00
parent 308fba1a8c
commit eaad8d5241
5 changed files with 7 additions and 10 deletions

View File

@@ -121,12 +121,13 @@ fn reset() {
assert reader.seek("end", -2) == true, "seek from end failed";
contents = reader.read(string);
assert (contents == "!\n" || contents == "\r\n"), "seek failed to move file position (2nd)";
print ">>>(" + contents + ")" + string( contents.length() );
assert contents == "\n", "seek failed to move file position (2nd)";
assert reader.seek("cur", -2) == true, "seek from cur failed";
contents = reader.read(string);
assert (contents == "!\n" || contents == "\r\n"), "seek failed to move file position (3rd)";
assert contents == "\n", "seek failed to move file position (3rd)";
assert reader.seek("CUR", 0) == false, "seek origin failed (1st)";
assert reader.seek("End", 0) == false, "seek origin failed (2nd)";

View File

@@ -44,7 +44,7 @@ void runBinaryWithLibrary(const unsigned char* tb, size_t size, const char* libr
Toy_initInterpreter(&interpreter);
//NOTE: supress print output for testing
Toy_setInterpreterPrint(&interpreter, noPrintFn);
// Toy_setInterpreterPrint(&interpreter, noPrintFn);
Toy_setInterpreterAssert(&interpreter, assertWrapper);
Toy_setInterpreterError(&interpreter, errorWrapper);