Skip to content

Commit

Permalink
Made test more robust by adding a check for the existence of the file…
Browse files Browse the repository at this point in the history
… before checking the creation time.
  • Loading branch information
PaulKlint committed Jan 20, 2025
1 parent 0840720 commit f7e8352
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/org/rascalmpl/library/lang/rascal/tests/library/IO.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ test bool watchDoesNotCrashOnURIRewrites() {
}

test bool createdDoesNotCrashOnURIRewrites() {
writeFile(|tmp:///createdDoesNotCrashOnURIRewrites/someFile.txt|, "123456789");
return created(|tmp:///createdDoesNotCrashOnURIRewrites/someFile.txt|) <= now();
loc l = |tmp:///createdDoesNotCrashOnURIRewrites/someFile.txt|;
remove(l); // remove the file if it exists
writeFile(l, "123456789");
return created(l) <= now();
}

test bool testWriteBase32() {
Expand Down

0 comments on commit f7e8352

Please sign in to comment.