auto-sync
This commit is contained in:
parent
a2421c9f79
commit
be05c8154b
|
@ -67,9 +67,9 @@ public class AutoTest {
|
|||
|
||||
chart = nextChart();
|
||||
double x = 100;
|
||||
assertWave(true, msg, chart, WaveChart.SPARK_1, 0.194433, 0.005, WaveReport.RATIO, x + 180, x + 540);
|
||||
assertWave(true, msg, chart, WaveChart.SPARK_1, 0.194433, 0.01, WaveReport.RATIO, x + 180, x + 540);
|
||||
assertWaveNull(msg, chart, WaveChart.SPARK_2);
|
||||
assertWave(true, msg, chart, WaveChart.SPARK_3, 0.194433, 0.005, WaveReport.RATIO, x, x + 360);
|
||||
assertWave(true, msg, chart, WaveChart.SPARK_3, 0.194433, 0.01, WaveReport.RATIO, x, x + 360);
|
||||
assertWaveNull(msg, chart, WaveChart.SPARK_4);
|
||||
|
||||
x = 176.856;
|
||||
|
|
|
@ -28,7 +28,9 @@ public class ExecHelper {
|
|||
|
||||
BufferedReader input =
|
||||
new BufferedReader(new InputStreamReader(ExecHelper.simulatorProcess.getInputStream()));
|
||||
new Thread(createErrorStreamEcho()).start();
|
||||
Thread thread = new Thread(createErrorStreamEcho());
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
|
||||
String line;
|
||||
while ((line = input.readLine()) != null) {
|
||||
|
|
|
@ -25,8 +25,12 @@ public class TestingUtils {
|
|||
return;
|
||||
}
|
||||
if (expectations.length == 1)
|
||||
fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations) + " ratio=" + Math.abs(1 - expectations[0] / current));
|
||||
fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations));
|
||||
fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations) + " ratio=" + Math.abs(1 - expectations[0] / current) + printRange(current, ratio));
|
||||
fail(msg + ": Got " + current + " while expecting " + Arrays.toString(expectations) + printRange(current, ratio));
|
||||
}
|
||||
|
||||
private static String printRange(double current, double ratio) {
|
||||
return " expected range from " + current * (1 - ratio) + " to " + current + (1 + ratio);
|
||||
}
|
||||
|
||||
private static double fixAngle(double angle) {
|
||||
|
|
Loading…
Reference in New Issue