From d6909233108f9a90db8faf15b29710b4afb4e54d Mon Sep 17 00:00:00 2001 From: mratsim Date: Wed, 25 Apr 2018 21:21:25 +0200 Subject: [PATCH] Update Stint in header + mention unsigned vs signed int in tests --- src/debug/debugutils.nim | 2 +- src/private/as_words.nim | 2 +- src/private/bithacks.nim | 2 +- src/private/conversion.nim | 2 +- src/private/initialization.nim | 2 +- src/private/int_bitwise_ops.nim | 2 +- src/private/uint_addsub.nim | 2 +- src/private/uint_bitwise_ops.nim | 2 +- src/private/uint_comparison.nim | 2 +- src/private/uint_div.nim | 2 +- src/private/uint_highlow.nim | 2 +- src/private/uint_mul.nim | 2 +- src/stint.nim | 2 +- src/uint_public.nim | 2 +- tests/property_based.nim | 2 +- tests/property_based_uint256.nim | 2 +- tests/test_int_comparison.nim | 2 +- tests/test_uint_addsub.nim | 6 +++--- tests/test_uint_bitwise.nim | 4 ++-- tests/test_uint_comparison.nim | 4 ++-- tests/test_uint_endianness.nim | 4 ++-- tests/test_uint_muldiv.nim | 6 +++--- 22 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/debug/debugutils.nim b/src/debug/debugutils.nim index 3688aeb..81cd7c4 100644 --- a/src/debug/debugutils.nim +++ b/src/debug/debugutils.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/as_words.nim b/src/private/as_words.nim index 778bc61..44c47b7 100644 --- a/src/private/as_words.nim +++ b/src/private/as_words.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/bithacks.nim b/src/private/bithacks.nim index 116451d..11694db 100644 --- a/src/private/bithacks.nim +++ b/src/private/bithacks.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/conversion.nim b/src/private/conversion.nim index 3f6847c..6932fb1 100644 --- a/src/private/conversion.nim +++ b/src/private/conversion.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/initialization.nim b/src/private/initialization.nim index 96d709e..71cc99e 100644 --- a/src/private/initialization.nim +++ b/src/private/initialization.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/int_bitwise_ops.nim b/src/private/int_bitwise_ops.nim index b363863..dca28f5 100644 --- a/src/private/int_bitwise_ops.nim +++ b/src/private/int_bitwise_ops.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/uint_addsub.nim b/src/private/uint_addsub.nim index 86cebe3..fed7e8b 100644 --- a/src/private/uint_addsub.nim +++ b/src/private/uint_addsub.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/uint_bitwise_ops.nim b/src/private/uint_bitwise_ops.nim index 86f2d2f..b8cb3c7 100644 --- a/src/private/uint_bitwise_ops.nim +++ b/src/private/uint_bitwise_ops.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/uint_comparison.nim b/src/private/uint_comparison.nim index 2eca293..0a2509a 100644 --- a/src/private/uint_comparison.nim +++ b/src/private/uint_comparison.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/uint_div.nim b/src/private/uint_div.nim index d801dad..4b802c4 100644 --- a/src/private/uint_div.nim +++ b/src/private/uint_div.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/uint_highlow.nim b/src/private/uint_highlow.nim index c9354e6..4ec2a87 100644 --- a/src/private/uint_highlow.nim +++ b/src/private/uint_highlow.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/private/uint_mul.nim b/src/private/uint_mul.nim index 041a7c4..8336118 100644 --- a/src/private/uint_mul.nim +++ b/src/private/uint_mul.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/stint.nim b/src/stint.nim index 5295369..463ba44 100644 --- a/src/stint.nim +++ b/src/stint.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/src/uint_public.nim b/src/uint_public.nim index 8e9a7ec..fea0bb3 100644 --- a/src/uint_public.nim +++ b/src/uint_public.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/tests/property_based.nim b/tests/property_based.nim index a2ec256..f671136 100644 --- a/tests/property_based.nim +++ b/tests/property_based.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/tests/property_based_uint256.nim b/tests/property_based_uint256.nim index a5d78f1..e70ac01 100644 --- a/tests/property_based_uint256.nim +++ b/tests/property_based_uint256.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/tests/test_int_comparison.nim b/tests/test_int_comparison.nim index e985bf9..ae7cdc1 100644 --- a/tests/test_int_comparison.nim +++ b/tests/test_int_comparison.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # diff --git a/tests/test_uint_addsub.nim b/tests/test_uint_addsub.nim index e8c0e05..50b6b43 100644 --- a/tests/test_uint_addsub.nim +++ b/tests/test_uint_addsub.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # @@ -9,7 +9,7 @@ import ../src/stint, unittest -suite "Testing addition implementation": +suite "Testing unsigned int addition implementation": test "In-place addition gives expected result": var a = 20182018.stuint(64) @@ -51,7 +51,7 @@ suite "Testing addition implementation": z += a check: cast[uint16](z) == 164 -suite "Testing substraction implementation": +suite "Testing unsigned int substraction implementation": test "In-place substraction gives expected result": var a = 20182018.stuint(64) diff --git a/tests/test_uint_bitwise.nim b/tests/test_uint_bitwise.nim index 39d2dba..6bdc286 100644 --- a/tests/test_uint_bitwise.nim +++ b/tests/test_uint_bitwise.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # @@ -9,7 +9,7 @@ import ../src/stint, unittest -suite "Testing bitwise operations": +suite "Testing unsigned int bitwise operations": let a = 100'i16.stuint(16) let b = a * a diff --git a/tests/test_uint_comparison.nim b/tests/test_uint_comparison.nim index 34728f2..1203865 100644 --- a/tests/test_uint_comparison.nim +++ b/tests/test_uint_comparison.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # @@ -9,7 +9,7 @@ import ../src/stint, unittest -suite "Testing comparison operators": +suite "Testing unsigned int comparison operators": let a = 10'i16.stuint(16) b = 15'i16.stuint(16) diff --git a/tests/test_uint_endianness.nim b/tests/test_uint_endianness.nim index eea24f7..ad387b4 100644 --- a/tests/test_uint_endianness.nim +++ b/tests/test_uint_endianness.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # @@ -9,7 +9,7 @@ import ../src/stint, unittest -suite "Testing byte representation": +suite "Testing unsigned int byte representation": test "Byte representation conforms to the platform endianness": let a = 20182018.stuint(64) let b = 20182018'u64 diff --git a/tests/test_uint_muldiv.nim b/tests/test_uint_muldiv.nim index 5c331f0..71dff56 100644 --- a/tests/test_uint_muldiv.nim +++ b/tests/test_uint_muldiv.nim @@ -1,4 +1,4 @@ -# Mpint +# Stint # Copyright 2018 Status Research & Development GmbH # Licensed under either of # @@ -9,7 +9,7 @@ import ../src/stint, unittest -suite "Testing multiplication implementation": +suite "Testing unsigned int multiplication implementation": test "Multiplication with result fitting in low half": let a = 10000.stuint(64) @@ -33,7 +33,7 @@ suite "Testing multiplication implementation": check: cast[uint64](a*b*c) == 1_000_000_000_000_000_000_000'u64 # need 70-bits -suite "Testing division and modulo implementation": +suite "Testing unsigned int division and modulo implementation": test "Divmod(100, 13) returns the correct result": let a = 100.stuint(64)