-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
import test from 'ava'; | ||
import { MyString, Float64Vec} from "diplomat-wasm-js-feature-tests"; | ||
import test from "ava"; | ||
import { MyString, Float64Vec } from "diplomat-wasm-js-feature-tests"; | ||
|
||
test("MyString functionality", (t) => { | ||
let str = MyString.new_("This is a test value."); | ||
t.is(str.str, "This is a test value."); | ||
let str = MyString.new_("This is a test value."); | ||
t.is(str.str, "This is a test value."); | ||
}); | ||
|
||
test("String List", (t) => { | ||
let str = MyString.newFromFirst(["This", "is", "a", "test."]); | ||
t.is(str.str, "This"); | ||
let str = MyString.newFromFirst(["This", "is", "a", "test."]); | ||
t.is(str.str, "This"); | ||
}); | ||
|
||
test("MyString borrow", (t) => { | ||
let str = MyString.new_("This is a test."); | ||
t.is(str.borrow(), "This is a test."); | ||
}); | ||
|
||
test("Float64Vec", (t) => { | ||
let input = [1, 2, 3, 4, 5]; | ||
let data = Float64Vec.newIsize(input); | ||
t.deepEqual(data.borrow(), input); | ||
let input = [1, 2, 3, 4, 5]; | ||
let data = Float64Vec.newIsize(input); | ||
t.deepEqual(data.borrow(), input); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.