Skip to content

Commit

Permalink
Add test for console.assert
Browse files Browse the repository at this point in the history
  • Loading branch information
justjavac committed Dec 13, 2018
1 parent 5dada45 commit 98f3544
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/console_assert_001.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
args: tests/console_assert_001.ts --reload
check_stderr: true
exit_code: 0
output: tests/console_assert_001.ts.out
1 change: 1 addition & 0 deletions tests/console_assert_001.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.assert(true, "should not fail");
Empty file added tests/console_assert_001.ts.out
Empty file.
4 changes: 4 additions & 0 deletions tests/console_assert_002.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
args: tests/console_assert_002.ts --reload
check_stderr: true
exit_code: 0
output: tests/console_assert_002.ts.out
1 change: 1 addition & 0 deletions tests/console_assert_002.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.assert();
1 change: 1 addition & 0 deletions tests/console_assert_002.ts.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Assertion failed
4 changes: 4 additions & 0 deletions tests/console_assert_003.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
args: tests/console_assert_003.ts --reload
check_stderr: true
exit_code: 0
output: tests/console_assert_003.ts.out
1 change: 1 addition & 0 deletions tests/console_assert_003.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.assert(false);
1 change: 1 addition & 0 deletions tests/console_assert_003.ts.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Assertion failed
4 changes: 4 additions & 0 deletions tests/console_assert_004.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
args: tests/console_assert_004.ts --reload
check_stderr: true
exit_code: 0
output: tests/console_assert_004.ts.out
1 change: 1 addition & 0 deletions tests/console_assert_004.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.assert(false, "should fail");
1 change: 1 addition & 0 deletions tests/console_assert_004.ts.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Assertion failed: should fail

0 comments on commit 98f3544

Please sign in to comment.