Skip to content

Commit

Permalink
fix to use exit() in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hidetatz committed Jul 30, 2023
1 parent 5156bab commit 73abb9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
5 changes: 0 additions & 5 deletions std/testing.sb

This file was deleted.

1 change: 0 additions & 1 deletion stdmod.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

var stdmods = []string{
"os",
"testing",
}

func isstdmod(target string) bool {
Expand Down
8 changes: 4 additions & 4 deletions tests/arith.sb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import testing
import assert

as = testing.assert

print("running arith test")
as = assert.assert

as(6, 4 + 2)
as(2, 4 - 2)
Expand All @@ -22,3 +20,5 @@ as(1.0, 0.1 * 10)
as(1.0, 0.1 * 10.0)
as(3, (1+2) * (3-2))
as(19, (1*2) + ((3-2) * 12 +(1*5)))

print("arith test succeeded")
8 changes: 4 additions & 4 deletions tests/binary.sb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import testing
import assert

as = testing.assert

print("running binary test")
as = assert.assert

as(false, 4 == 2)
as(false, 4 == 4.0)
Expand All @@ -29,3 +27,5 @@ as(0, 1 & 6)
as(7, 1 ^ 6)
as(24, 3 << 3)
as(1, 3 >> 1)

print("binary test succeeded")

0 comments on commit 73abb9b

Please sign in to comment.