diff options
Diffstat (limited to 'sdks/wasm/other.js')
-rw-r--r-- | sdks/wasm/other.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/sdks/wasm/other.js b/sdks/wasm/other.js index 93e091f7ad5..93532686914 100644 --- a/sdks/wasm/other.js +++ b/sdks/wasm/other.js @@ -1,3 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + function big_array_js_test (len) { var big = new Array(len); for (let i=0; i < len; i ++) { @@ -27,4 +30,36 @@ function getters_js_test () { }; console.log (`break here`); return ptd; -}
\ No newline at end of file +} + +function exception_caught_test () { + try { + throw new TypeError ('exception caught'); + } catch (e) { + console.log(e); + } +} + +function exception_uncaught_test () { + console.log('uncaught test'); + throw new RangeError ('exception uncaught'); +} + +function exceptions_test () { + exception_caught_test (); + exception_uncaught_test (); +} + +function negative_cfo_test (str_value = null) { + var ptd = { + get Int () { return 5; }, + get String () { return "foobar"; }, + get DT () { return "dt"; }, + get IntArray () { return [1,2,3]; }, + get DTArray () { return ["dt0", "dt1"]; }, + DTAutoProperty: "dt", + StringField: str_value + }; + console.log (`break here`); + return ptd; +} |