aboutsummaryrefslogtreecommitdiffstats
path: root/test/bls_test.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-08-28 05:09:41 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-08-28 05:09:41 +0800
commit5a2fded35bbc0d341da374d6c43c0091e026266b (patch)
treef7757357ae96aae7024f030587be43730b3ad2d4 /test/bls_test.cpp
parent135e3e6014431a9358a13ce96d0b4870cc916ee3 (diff)
downloaddexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.tar
dexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.tar.gz
dexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.tar.bz2
dexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.tar.lz
dexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.tar.xz
dexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.tar.zst
dexon-bls-5a2fded35bbc0d341da374d6c43c0091e026266b.zip
exception if the value >= r
Diffstat (limited to 'test/bls_test.cpp')
-rw-r--r--test/bls_test.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/bls_test.cpp b/test/bls_test.cpp
index c7bdb68..cfd655c 100644
--- a/test/bls_test.cpp
+++ b/test/bls_test.cpp
@@ -49,13 +49,10 @@ CYBOZU_TEST_AUTO(id)
}
{
/*
- truncate the value in [0, r)
+ exception if the value >= r
*/
- const uint64_t id1[] = { uint64_t(-1), uint64_t(-1), uint64_t(-1), uint64_t(-1) };
- id.set(id1);
- std::ostringstream os;
- os << std::hex << id;
- CYBOZU_TEST_ASSERT(os.str() != "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
+ const uint64_t id1[] = { 0, 0, 0, uint64_t(-1) };
+ CYBOZU_TEST_EXCEPTION(id.set(id1), std::exception);
}
}