diff options
author | pacien | 2018-11-23 12:57:00 +0100 |
---|---|---|
committer | pacien | 2018-11-23 13:00:53 +0100 |
commit | d9768cd0315b0415d20818de9c897c6168c95b78 (patch) | |
tree | 41987740d02f689550436384dd7d2b755aa85869 /tests/tintegers.nim | |
parent | c87ea5c5d11bffbe84acf66215e6bf5a5e047a50 (diff) | |
download | gziplike-d9768cd0315b0415d20818de9c897c6168c95b78.tar.gz |
Split bitstream into bitreader and bitwriter
Diffstat (limited to 'tests/tintegers.nim')
-rw-r--r-- | tests/tintegers.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/tintegers.nim b/tests/tintegers.nim index 720677e..de43c09 100644 --- a/tests/tintegers.nim +++ b/tests/tintegers.nim | |||
@@ -14,7 +14,7 @@ | |||
14 | # You should have received a copy of the GNU Affero General Public License | 14 | # You should have received a copy of the GNU Affero General Public License |
15 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | import unittest | 17 | import unittest, sequtils |
18 | import integers | 18 | import integers |
19 | 19 | ||
20 | suite "integers": | 20 | suite "integers": |
@@ -26,3 +26,7 @@ suite "integers": | |||
26 | check truncateToUint8(0xFA'u8) == 0xFA'u8 | 26 | check truncateToUint8(0xFA'u8) == 0xFA'u8 |
27 | check truncateToUint8(0x00FA'u16) == 0xFA'u8 | 27 | check truncateToUint8(0x00FA'u16) == 0xFA'u8 |
28 | check truncateToUint8(0xFFFA'u16) == 0xFA'u8 | 28 | check truncateToUint8(0xFFFA'u16) == 0xFA'u8 |
29 | |||
30 | test "chunks iterator": | ||
31 | check toSeq(chunks(70, uint32)) == @[(0, 32), (1, 32), (2, 6)] | ||
32 | check toSeq(chunks(32, uint16)) == @[(0, 16), (1, 16)] | ||