提交 2c7f4eb8 编写于 作者: 杜庆泉's avatar 杜庆泉

更新 typeof 测试示例

上级 4d85b7bc
...@@ -73,20 +73,23 @@ export function getAppTempPathTest() : boolean { ...@@ -73,20 +73,23 @@ export function getAppTempPathTest() : boolean {
* UTSAndroid.typeof 测试示例 * UTSAndroid.typeof 测试示例
*/ */
export function typeofClickTest() : boolean { export function typeofClickTest() : boolean {
if (UTSAndroid.typeof('hello wrold') != 'string') { if ((typeof 'hello wrold') != 'string') {
return false return false
} }
if (UTSAndroid.typeof(3.1415926) != 'number') {
if ((typeof 3.1415) != 'Double') {
return false return false
} }
if (UTSAndroid.typeof(false) != 'boolean') {
if ((typeof false) != 'boolean') {
return false return false
} }
if (UTSAndroid.typeof(true) != 'boolean') { if ((typeof true) != 'boolean') {
return false return false
} }
if (UTSAndroid.typeof(new Date()) != 'object') { if ((typeof new Date()) != 'object') {
return false return false
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册