jangko
54e24cae41
Disable test that crash with debug cpp nimRawSetJmp on nim v2
2023-09-12 21:08:10 +07:00
jangko
c5955f7e97
fix broken io test on 32 bit
2023-06-22 22:54:22 +07:00
jangko
025428d0ae
tidying up tests
2023-06-22 22:31:12 +07:00
jangko
e99bc7ff89
add signed int modular arithmetic and tests
2023-06-20 21:38:02 +07:00
jangko
80ccea2643
fix conversion raises, inlining, and min/max test
2023-06-20 18:27:17 +07:00
jangko
4a3f300bd6
fix stuint truncate on 32bit platform
2023-06-19 18:27:49 +07:00
jangko
140afc31ab
fix stuint truncate
2023-06-19 17:20:54 +07:00
jangko
41bfed6bb7
io test
2023-06-14 22:26:44 +07:00
tersec
95b91474ce
remove Nim 1.2 and 1.4 support
2023-06-08 11:08:27 +00:00
tersec
86621eced1
remove pre-Nim 1.2 support ( #127 )
2023-06-05 11:42:36 +00:00
G
f36623998f
fix(skipPrefixes): fix erroneous strip of 0b in hex numbers ( #120 )
...
* fix(skipPrefixes): fix erroneous strip of 0b in hex numbers
* refactor(skipPrefixes): normalize radix checks
* feat(stint): add tests for bin, oct, hex string conversions
* fix(stint): fix cast
* fix(stint): fix typo
* fix(stint): alternative format
* feat(stint): add test
* fix(stint): fix stint width in test
2022-10-03 12:15:45 +02:00
Kim De Mey
e656ad40d1
Enable --styleCheck:usages ( #118 )
2022-02-24 20:09:53 +01:00
Mamy Ratsimbazafy
06e5c4829c
Parsing should raise CatchableError for user inputs ( #110 )
2021-10-06 18:53:52 +02:00
zah
9e49b00148
Define a hash function in order to support Stint keys in hash tables ( #102 )
...
* Hash stint values as byte blobs; Add a basic test for using stint keys in a table
2019-12-18 14:02:16 +01:00
andri lim
7fe4db62dc
add compiletime test for signed int dumphex
2019-10-25 19:54:41 +03:00
andri lim
8cc9116d1e
cosmetics changes
2019-10-23 21:55:47 +09:00
andri lim
3189775012
fixes 32bit failure
2019-10-23 21:55:47 +09:00
andri lim
0cd6b2a052
improve io test coverage + compile time test
2019-10-23 21:55:47 +09:00
Ștefan Talpalaru
6853ebe97c
assert() -> doAssert()
2019-03-14 03:43:51 +01:00
mratsim
4fe901d33b
Use truncate instead of toInt and co
2018-10-08 21:11:06 +00:00
mratsim
2d6ea71657
BREAKING: Change named param from `base` to `radix` in io procs
2018-10-08 21:11:06 +00:00
mratsim
53ceaffdfa
Fix endianness issue in toInt64 and toUint64
2018-10-08 21:11:06 +00:00
mratsim
f161454309
Add tests for toUint/toUint64, toInt, toInt64
2018-10-08 21:11:06 +00:00
zah
f05feeb865
Relaxed construction from BE bytes ( #57 )
...
* Support automatic padding when constructing values from byte arrays
* add a test case for fromBytesBE
2018-07-04 17:34:14 +02:00
zah
6ae8de932d
Add explicit generic conversion operators ( #56 )
...
The new `to` operators that can be used to constuct Stint types from
regular integer types. These are intented for usage in generic code
such as rlp.nim
Also fixes a bug preventing construction of Stint values from unsigned
integers (because they lack an unary `-` operator).
2018-06-27 12:18:48 +02:00
mratsim
7c11f7da07
add `$` alias for toString
2018-05-15 11:51:59 +02:00
Yuriy Glukhov
ad09fe3a94
Corrected package structure
2018-05-08 17:42:42 +03:00
mratsim
012dcf288c
Add toHex shortcut for toString(16)
2018-05-08 14:44:07 +02:00
Mamy Ratsimbazafy
adb75b32b8
[IO]: Add readUintBE, hexToUint, toByteArrayBE
...
* Add readUintBE and toByteArrayBE proc
* Add readUintBE, hexToUint, to ByteArrayBE and reorder parse arguments + tests
2018-05-08 13:21:04 +02:00
Mamy Ratsimbazafy
fd0482180f
Add bigint serialization (hex and decimal) ( #29 )
...
* Add serialization for decimal and hex
* Fix carry bug in signed add
* Add parsing test
* Improve highlow for int, remove most_significant_word_mut
* make conversion toString compile
* Add division corner case test
* Remove a buggy division shortcut
* Fix decimal string conversion
* Fix hex dumping
* Fix power of 2 division (what was I thinking?)
* Add hexdump test
* Move runtime check to compile-time
* Fix static assert check
* more compile-time asserts
* Fix parsing of negative hex numbers, add test_io to the suite
* dump default to bigEndian, split toString in Stint and Stuint
* Add (failing) tests with big ints conversion
* Temporarily remove all the noInit pragma
2018-04-30 13:38:55 +02:00