-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix-primitive-slice-js * remove bench code * gen example js * fix primitive slice test * Update feature_tests/js/test/slices.mjs Co-authored-by: Tyler K <[email protected]> --------- Co-authored-by: Manish Goregaokar <[email protected]> Co-authored-by: Tyler K <[email protected]>
- Loading branch information
1 parent
4f21266
commit 7a2fbdc
Showing
8 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import test from 'ava'; | ||
import { MyString } from "diplomat-wasm-js-feature-tests"; | ||
import test from "ava"; | ||
import { MyString, Float64Vec } from "diplomat-wasm-js-feature-tests"; | ||
import wasm from "../api/diplomat-wasm.mjs"; | ||
|
||
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("Float64Vec", (t) => { | ||
let input = [1, 2, 3, 4, 5]; | ||
let data = Float64Vec.newIsize(input); | ||
t.deepEqual(data.borrow(), input); | ||
}); |
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
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
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