Browse Source

Fix missing assertions in tests

kindlich 4 years ago
parent
commit
2a5f279c6e
No known key found for this signature in database

+ 3
- 1
ScriptingExample/src/test/java/org/openzen/zenscript/scriptingexample/tests/actual_test/HelloWorldTest.java View File

@@ -9,7 +9,9 @@ public class HelloWorldTest extends ZenCodeTest {
9 9
     public void helloWorld() {
10 10
         addScript("println('hello world');");
11 11
         executeEngine();
12
-        
12
+    
13
+        logger.assertNoErrors();
14
+        logger.assertNoWarnings();
13 15
         logger.assertPrintOutputSize(1);
14 16
         logger.assertPrintOutput(0, "hello world");
15 17
     }

+ 5
- 1
ScriptingExample/src/test/java/org/openzen/zenscript/scriptingexample/tests/actual_test/arithmethic_operators/AdditionTest.java View File

@@ -13,6 +13,8 @@ public class AdditionTest extends ZenCodeTest {
13 13
         addScript(String.format("println(%d + %d);", i, j));
14 14
         executeEngine();
15 15
         
16
+        logger.assertNoErrors();
17
+        logger.assertNoWarnings();
16 18
         logger.assertPrintOutputSize(1);
17 19
         logger.assertPrintOutput(0, String.valueOf(i + j));
18 20
     }
@@ -21,7 +23,9 @@ public class AdditionTest extends ZenCodeTest {
21 23
     public void testChainedAdditions() {
22 24
         addScript("println(1+2+3+4+5+6+7+8+9+10);");
23 25
         executeEngine();
24
-        
26
+    
27
+        logger.assertNoErrors();
28
+        logger.assertNoWarnings();
25 29
         logger.assertPrintOutputSize(1);
26 30
         logger.assertPrintOutput(0, String.valueOf(55));
27 31
     }

+ 3
- 1
ScriptingExample/src/test/java/org/openzen/zenscript/scriptingexample/tests/actual_test/control_structures/LoopTest.java View File

@@ -9,7 +9,9 @@ public class LoopTest extends ZenCodeTest {
9 9
     public void validateOutput() {
10 10
         addScript("for i in 0 .. 100 println(i);");
11 11
         executeEngine();
12
-        
12
+    
13
+        logger.assertNoErrors();
14
+        logger.assertNoWarnings();
13 15
         logger.assertPrintOutputSize(100);
14 16
         for(int i = 0; i < 100; i++) {
15 17
             logger.assertPrintOutput(i, String.valueOf(i));

+ 4
- 0
ScriptingExample/src/test/java/org/openzen/zenscript/scriptingexample/tests/actual_test/packages/SamePackage.java View File

@@ -11,6 +11,8 @@ public class SamePackage extends ZenCodeTest {
11 11
         addScript("println(doSomething());", "b.zs");
12 12
         
13 13
         executeEngine();
14
+        logger.assertNoErrors();
15
+        logger.assertNoWarnings();
14 16
         logger.assertPrintOutputSize(1);
15 17
         logger.assertPrintOutput(0, "Hello World");
16 18
     }
@@ -21,6 +23,8 @@ public class SamePackage extends ZenCodeTest {
21 23
         addScript("println(doSomething());", "some/test/package/b.zs");
22 24
     
23 25
         executeEngine();
26
+        logger.assertNoErrors();
27
+        logger.assertNoWarnings();
24 28
         logger.assertPrintOutputSize(1);
25 29
         logger.assertPrintOutput(0, "Hello World");
26 30
     }

Loading…
Cancel
Save