Browse Source

Provide more meaningful error message

master
Jan Matrne 5 years ago
parent
commit
f8e349cdba
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java

+ 7
- 1
src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java View File

@@ -170,6 +170,12 @@ public class ScriptDefTest {
notCompiledDuration = System.nanoTime() - start;
}

assertTrue(duration < notCompiledDuration);
assertTrue(
String.format(
"Compiled scripts should run faster (%d ns) than not compiled (%d ns) scripts.",
duration, notCompiledDuration
),
duration < notCompiledDuration
);
}
}

Loading…
Cancel
Save