@@ -29,6 +29,12 @@ class TestSetRunner {
2929 this . testSet = testSet
3030 }
3131
32+ /**
33+ * runs test set on the native file system
34+ *
35+ * @param folder temp folder
36+ * @return true on success, false on failure, ie. if there were any differences
37+ */
3238 boolean runOnNativeFileSystem (File folder ) {
3339 def source = testSet. name
3440
@@ -67,12 +73,18 @@ class TestSetRunner {
6773 def expected = " ${ expectedPath} /$it "
6874 def generated = generatedPath. resolve (it)
6975
70- success &= printUnifiedDiff (expected, generated)
76+ success &= ! printUnifiedDiff (expected, generated)
7177 }
7278
7379 success
7480 }
7581
82+ /**
83+ * runs test set on the given file system
84+ *
85+ * @param fs the file system
86+ * @return true on success, false on failure, ie. if there were any differences
87+ */
7688 boolean runOnCustomFileSystem (FileSystem fs ) {
7789 def source = testSet. name
7890
@@ -116,7 +128,7 @@ class TestSetRunner {
116128 def expected = expectedPath. resolve (it)
117129 def generated = generatedPath. resolve (it)
118130
119- success &= printUnifiedDiff (expected, generated)
131+ success &= ! printUnifiedDiff (expected, generated)
120132 }
121133
122134 success
@@ -230,7 +242,7 @@ class TestSetRunner {
230242 /**
231243 * unified diff resources <=> file system
232244 *
233- * @return true if delta
245+ * @return true if there is a difference
234246 */
235247 private boolean printUnifiedDiff (String expected , Path generated ) {
236248 def expectedLines = getResource (expected). readLines ()
0 commit comments