improve tests just a bit (#79)
This commit is contained in:
parent
9b81aec7e4
commit
fcea7ba1d5
2
test/os/platform/is_posix.wren
vendored
2
test/os/platform/is_posix.wren
vendored
@ -2,4 +2,4 @@ import "os" for Platform
|
||||
|
||||
// Can't test for certain values since this test is cross-platform, but we can
|
||||
// at least make sure it is callable and returns a bool.
|
||||
System.print(Platform.isPosix is Bool) // expect: true
|
||||
System.print(Platform.isPosix is Bool) // expect: true
|
||||
11
test/os/platform/name.wren
vendored
11
test/os/platform/name.wren
vendored
@ -1,5 +1,16 @@
|
||||
import "os" for Platform
|
||||
|
||||
var platforms = [
|
||||
"Windows",
|
||||
"iOS",
|
||||
"OS X",
|
||||
"Unknown",
|
||||
"Linux",
|
||||
"Unix",
|
||||
"POSIX"
|
||||
]
|
||||
|
||||
// Can't test for certain values since this test is cross-platform, but we can
|
||||
// at least make sure it is callable and returns a string.
|
||||
System.print(Platform.name is String) // expect: true
|
||||
System.print(platforms.contains(Platform.name)) // expect: true
|
||||
1
test/os/process/version.wren
vendored
1
test/os/process/version.wren
vendored
@ -5,3 +5,4 @@ System.print(Process.version.isEmpty) // expect: false
|
||||
|
||||
var isNumber = Fn.new {|str| Num.fromString(str) != null }
|
||||
System.print(Process.version.split(".").all(isNumber)) // expect: true
|
||||
System.print(Process.version.split(".").count) // expect: 3
|
||||
Loading…
Reference in New Issue
Block a user