Commit graph

132 commits

Author SHA1 Message Date
Richard Feldman
4eec34becf
Update to use new square brace formatting 2022-05-22 23:15:54 -04:00
Drake
43674efb32
fix: pass along parsed number string 2022-05-14 15:44:16 -06:00
Folkert
a9bee7f564
only run min/max test on wasm/llvm; dev backend doesn't implement them 2022-05-10 18:33:00 +02:00
Ayaz Hafiz
029fbb372b
Fix gen test 2022-05-10 09:24:16 -04:00
Richard Feldman
8453b233bc
Fix test 2022-05-10 08:40:33 -04:00
Folkert
ff48bf0899
min/max abs tests 2022-05-10 13:23:57 +02:00
Folkert
5cd36a3c26
add tests for the new min/max constants 2022-05-09 22:56:54 +02:00
Richard Feldman
df7df4ccf8
Merge branch 'trunk' into mfonism/rename-num-float-type-to-frac 2022-05-08 20:54:33 -04:00
Mfon Eti-mfon
9068c2414e
Rename float functions and vars 2022-05-08 18:42:12 +01:00
jonas schell
532055bf3b implement NumPowInt 2022-05-08 14:17:11 +02:00
Folkert
07383e96f0
Merge remote-tracking branch 'origin/trunk' into i/2792 2022-05-06 20:17:53 +02:00
Ayaz Hafiz
4304c2c2f0
Correct output type of flapping test
The Roc program in this test returns a U8, but the tested type is marked
as a U16, so it's possible we were just picking up garbage bytes.

Closes #2997
2022-05-04 12:49:07 -04:00
Jared Cone
c0780aad92
Implemented unsigned int comparisons. 2022-05-02 04:28:28 -07:00
Richard Feldman
082fde976a
Merge branch 'trunk' into sqrt-unchecked 2022-04-20 08:19:34 -04:00
Richard Feldman
93677001ba
Merge pull request #2888 from rtfeldman/divTrunc
rename divFloor to divTrunc
2022-04-19 21:57:49 -04:00
Kevin Gillette
d236c28743
Merge branch 'trunk' into sqrt-unchecked 2022-04-18 19:12:22 -06:00
Kevin Gillette
6a3fd3a607
rename divFloor to divTrunc 2022-04-18 02:33:31 -06:00
Kevin Gillette
1908ff41c3
rem, sqrt, log are unchecked but have checked variants
mod exists but is not implemented due to lack of hardware support
(emulation, possibly in terms of rem, is needed).
2022-04-17 14:40:39 -06:00
Folkert
e112f6ad2c
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-16 21:01:51 +02:00
Jared Cone
b35debee70
fixed formatting 2022-04-13 23:36:00 -07:00
Jared Cone
17e5ec85aa
Num.toStr unit tests 2022-04-13 23:18:00 -07:00
Folkert
2b07b8c78d
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-13 21:45:40 +02:00
Nikita Mounier
dfba77bd04
Explicit i128 in test. 2022-04-12 16:41:29 +00:00
Nikita Mounier
6b2d1a7af6
Remove outdated comments. 2022-04-11 23:36:30 +00:00
Nikita Mounier
dbb91639e9
Revert weird changes in tests. 2022-04-11 21:33:22 +00:00
Nikita Mounier
20b9f6377c
Fix f64 ambiguity in test. 2022-04-11 19:43:21 +00:00
Nikita Mounier
799c05f183
Fix test. 2022-04-11 17:56:43 +00:00
Nikita Mounier
1d5ab1d79c
Merge remote-tracking branch 'origin/trunk' into div-no-result 2022-04-11 17:51:38 +00:00
Nikita Mounier
8206f345c7 Merge remote-tracking branch 'origin/trunk' into div-no-result 2022-04-11 11:45:06 +00:00
Nikita Mounier
4ecf2a8c24 Modify division behaviour to panic when dividing by 0, and add divChecked, divFloorChecked and divCeilingChecked` for safe alternatives which return a Result, mimicking the previous behaviour. 2022-04-11 11:23:33 +00:00
Folkert
1d0f9e9192
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-04-08 15:47:11 +02:00
Ayaz Hafiz
4029748bdf
Fix llvm type errors for float functions
Closes #2792
2022-04-07 18:17:29 -04:00
Richard Feldman
4dc7e61f3f
Move conversion tests to test_gen 2022-04-07 16:27:01 -04:00
Ayaz Hafiz
9fbc525d02
Make sure float suffixes are parsed out after can
Before we hit mono, we need to make sure the suffixes of numeric
literals are parsed out from the literal string, so that we don't try to
parse something whose type we already know but has the extraneous
suffix.

Co'ed with @tagraves
2022-04-05 11:32:34 -04:00
Folkert
877b9eab7a
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-03-23 17:33:58 +01:00
Brian Carroll
faaa1ca8f9 test_gen: crazy conditional compilation options for right-shift tests! 2022-03-22 22:55:00 +00:00
Brian Carroll
24e6cd80e7 wasm: fix argument order for shiftRightBy & disable tests with 8-bit values 2022-03-22 22:28:18 +00:00
Brendan Hansknecht
42f49c1d79 also add test for overshifting to make sure we don't get bits from higher up in the type 2022-03-20 22:09:11 -07:00
Brendan Hansknecht
20ed4cbacb cleanup test type sizes and add more cases for i8 2022-03-20 22:01:13 -07:00
Jan Van Bruggen
46fc305d56 Fix Num.shiftRight* tests 2022-03-20 21:39:39 -06:00
Jan Van Bruggen
9fb3549c24 Enable Num.shiftRight* tests 2022-03-20 21:39:39 -06:00
Folkert
4e1197165b
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc-delayed-alias 2022-03-18 21:25:52 +01:00
ayazhafiz
530fa9943a Generate unsigned div and modulo correctly
Closes #2705
2022-03-13 18:44:38 -05:00
Brendan Hansknecht
d681062c63 add Num.toNat 2022-03-11 11:17:42 -08:00
hafiz
8679904fc3
Disable wasm test for now 2022-03-10 18:19:27 -06:00
ayazhafiz
a90bba3d1d Make sure casting to unsigned types performs zero-extension
Closes #2696
2022-03-10 17:39:37 -06:00
Folkert
bd31503855
Merge remote-tracking branch 'origin/trunk' into builtins-in-roc 2022-02-28 18:55:20 +01:00
Folkert
0107d78ea0
most of Num 2022-02-27 13:03:47 +01:00
Brendan Hansknecht
ffee5ab97a add some more tests, including failure for new line 2022-02-25 22:05:21 -08:00
Brendan Hansknecht
c025b8806b disable accidentally enabled test on dev backend 2022-02-25 21:07:20 -08:00