61890b15cb
* wip * move print and JSON functions to modules * builtin functions are not replacable now * builtin functions are added for default nil symbol table * importables: builtin modules and source modules * refactoring runtime tests * fix tests * update documentation * cleanup * clean up cli * fix REPL prints
15 lines
343 B
Go
15 lines
343 B
Go
package runtime_test
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestBangOperator(t *testing.T) {
|
|
expect(t, `out = !true`, nil, false)
|
|
expect(t, `out = !false`, nil, true)
|
|
expect(t, `out = !0`, nil, true)
|
|
expect(t, `out = !5`, nil, false)
|
|
expect(t, `out = !!true`, nil, true)
|
|
expect(t, `out = !!false`, nil, false)
|
|
expect(t, `out = !!5`, nil, true)
|
|
}
|