summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2020-08-25 15:58:32 +0800
committerGitHub <noreply@github.com>2020-08-25 09:58:32 +0200
commit7cee63bba3805bd49f0c03b94d65f02dea04f946 (patch)
treec36977d4867d6d5ccab33b1d00f45c126a8b6946 /tests/js
parent15ff89cec14ea6d1bc05a5975dedfcb6e712720b (diff)
downloadNim-7cee63bba3805bd49f0c03b94d65f02dea04f946.tar.gz
avoid #8231, bitwise move to mul,div (#15070)
* avoid #8231, bitwise move to mul,div

* add test for #8231

* fix bitwise move when div result is float

* bitwise move depends on typ.size
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/t8231.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/js/t8231.nim b/tests/js/t8231.nim
new file mode 100644
index 000000000..b0625a621
--- /dev/null
+++ b/tests/js/t8231.nim
@@ -0,0 +1,3 @@
+import strutils
+
+doAssert formatSize(2462056448, '.', bpIEC, false) == "2.293GiB"
\ No newline at end of file