-
-
Save malthe/d75e9fff12b7744e320fb51103c7086d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use "ponytest" | |
actor Main is TestList | |
new create(env: Env) => PonyTest(env, this) | |
new make() => None | |
fun tag tests(test: PonyTest) => | |
test(_TestString) | |
class iso _TestString is UnitTest | |
fun name(): String => "builtin/String" | |
fun apply(h: TestHelper) => | |
_test_cstring(h) | |
fun _test_cstring(h: TestHelper) => | |
let s: String iso = "Hello world".clone() | |
s.trim_in_place(where to=s.size() - 1) | |
h.assert_eq[String](s, "Hello world") | |
h.assert_false(s.is_null_terminated()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment