improve tests just a bit (#79)
This commit is contained in:
Vendored
+1
-1
@@ -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
|
||||
Vendored
+11
@@ -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
|
||||
Vendored
+1
@@ -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
|
||||
Reference in New Issue
Block a user