|
|
|
@ -13,8 +13,12 @@ function builtins() {
@@ -13,8 +13,12 @@ function builtins() {
|
|
|
|
|
eq(test.ReturnsBool(), true) |
|
|
|
|
eq(test.PassAndReturnsBool(false), false) |
|
|
|
|
|
|
|
|
|
// TODO: https://github.com/emscripten-core/emscripten/pull/18661
|
|
|
|
|
/* |
|
|
|
|
eq(test.ReturnsNullptr(), null) |
|
|
|
|
eq(test.PassNullptr(null), undefined) |
|
|
|
|
eq(test.PassAndReturnsNullptr(null), null) |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
eq(test.ReturnsChar(), ascii('a')); |
|
|
|
|
eq(test.ReturnsSChar(), ascii('a')); |
|
|
|
@ -41,12 +45,6 @@ function builtins() {
@@ -41,12 +45,6 @@ function builtins() {
|
|
|
|
|
eq(test.ReturnsInt32(), -5); |
|
|
|
|
eq(test.ReturnsUInt32(), 5); |
|
|
|
|
|
|
|
|
|
// TODO:
|
|
|
|
|
// https://github.com/WebAssembly/proposals/issues/7
|
|
|
|
|
// https://github.com/emscripten-core/emscripten/issues/11140
|
|
|
|
|
//eq(test.ReturnsInt64(), -5n);
|
|
|
|
|
//eq(test.ReturnsUInt64(), 5n);
|
|
|
|
|
|
|
|
|
|
const int8 = { min: -(2 ** 7), max: (2 ** 7) - 1 }; |
|
|
|
|
eq(test.PassAndReturnsInt8(int8.min), int8.min); |
|
|
|
|
eq(test.PassAndReturnsInt8(int8.max), int8.max); |
|
|
|
@ -71,13 +69,21 @@ function builtins() {
@@ -71,13 +69,21 @@ function builtins() {
|
|
|
|
|
eq(test.PassAndReturnsUInt32(uint32.min), uint32.min); |
|
|
|
|
eq(test.PassAndReturnsUInt32(uint32.max), uint32.max); |
|
|
|
|
|
|
|
|
|
//const int64 = { min: BigInt(2 ** 63) * -1n, max: BigInt(2 ** 63) - 1n };
|
|
|
|
|
//eq(test.PassAndReturnsInt64(int64.min), int64.min);
|
|
|
|
|
//eq(test.PassAndReturnsInt64(int64.max), int64.max);
|
|
|
|
|
|
|
|
|
|
//const uint64 = { min: BigInt(0), max: BigInt(2 ** 64) - 1n };
|
|
|
|
|
//eq(test.PassAndReturnsUInt64(uint64.min), uint64.min);
|
|
|
|
|
//eq(test.PassAndReturnsUInt64(uint64.max), uint64.max);
|
|
|
|
|
// TODO:
|
|
|
|
|
// https://github.com/WebAssembly/proposals/issues/7
|
|
|
|
|
// https://github.com/emscripten-core/emscripten/issues/11140
|
|
|
|
|
/* |
|
|
|
|
eq(test.ReturnsInt64(), -5n); |
|
|
|
|
eq(test.ReturnsUInt64(), 5n); |
|
|
|
|
|
|
|
|
|
const int64 = { min: BigInt(2 ** 63) * -1n, max: BigInt(2 ** 63) - 1n }; |
|
|
|
|
eq(test.PassAndReturnsInt64(int64.min), int64.min); |
|
|
|
|
eq(test.PassAndReturnsInt64(int64.max), int64.max); |
|
|
|
|
|
|
|
|
|
const uint64 = { min: BigInt(0), max: BigInt(2 ** 64) - 1n }; |
|
|
|
|
eq(test.PassAndReturnsUInt64(uint64.min), uint64.min); |
|
|
|
|
eq(test.PassAndReturnsUInt64(uint64.max), uint64.max); |
|
|
|
|
*/ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function enums() { |
|
|
|
@ -105,9 +111,10 @@ function classes() {
@@ -105,9 +111,10 @@ function classes() {
|
|
|
|
|
|
|
|
|
|
var classWithField = new test.ClassWithField(); |
|
|
|
|
eq(classWithField.ReturnsField(), 10); |
|
|
|
|
eq(classWithField.Field, 10); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// NOTE: Field properties are only supported for value types
|
|
|
|
|
//eq(classWithField.Field, 10);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
builtins(); |
|
|
|
|
enums(); |
|
|
|
|