Skip to content

Commit

Permalink
put hamcrest class sources in machine-independent location
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Sep 19, 2023
1 parent 9636851 commit 774953d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,15 @@ private bool compareJarM3s(loc reference, loc jar, M3 (loc) builder)
builder(jar)
);

private loc getAndCopyToTemp(str jar) {
loc source = get(jar);
loc target = |tmp:///| + jar;
copy(source, target);
return target;
}

public test bool hamcrestJarM3RemainedTheSame()
= compareJarM3s(get("m3/hamcrest-library-1.3-m3.bin"), get("m3/hamcrest-library-1.3.jar"), getHamcrestM3);
= compareJarM3s(get("m3/hamcrest-library-1.3-m3.bin"), getAndCopyToTemp("m3/hamcrest-library-1.3.jar"), getHamcrestM3);

// TODO: think if this can be replaced by the generic diff function.
public bool compareM3s(M3 a, M3 b) {
Expand Down
Binary file modified test/org/rascalmpl/test/data/m3/hamcrest-library-1.3-m3.bin
Binary file not shown.

0 comments on commit 774953d

Please sign in to comment.