Skip to content

Commit

Permalink
添加过大数字精度丢失测试
Browse files Browse the repository at this point in the history
  • Loading branch information
pedant committed Sep 9, 2014
1 parent 33bb646 commit cafebdc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion assets/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h3>Java Interface 可用接口列表测试</h3>
测试代码执行时间<br/>
代码:<br/>
<div>
HostApp.testLossTime(new Date().getTime() + '');
HostApp.testLossTime(new Date().getTime());
</div>
<button onclick="HostApp.testLossTime(new Date().getTime());">测试</button>
</li>
Expand Down Expand Up @@ -180,6 +180,18 @@ <h3>Java Interface 可用接口列表测试</h3>
</div>
<button onclick="HostApp.alert(HostApp.retJavaObject()[0].intField);">测试</button>
</li>

<br/>
<li>
过大数字精度丢失测试<br/>
代码:<br/>
<div>
HostApp.alert(
HostApp.passLongType(14102300951321235) + ''
);
</div>
<button onclick="HostApp.alert(HostApp.passLongType(14102300951321235) + '');">测试</button>
</li>
</ul>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,8 @@ public void run() {
}
});
}

public static long passLongType (WebView view, long i) {
return i;
}
}

0 comments on commit cafebdc

Please sign in to comment.