aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-06-01 23:33:23 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:27:52 +0100
commit720ac855531ec777c4c7c51144ad672823df5a0e (patch)
tree5b7d94e74664061ad019781b3a52eb8ba0c14c1c /tests
parentringct: add a test for prooveRange being non deterministic (diff)
downloadmonero-720ac855531ec777c4c7c51144ad672823df5a0e.tar.xz
tests: zero inputs/outputs are in fact supposed to be accepted
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/ringct.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp
index cd1dfbe51..f2ad75edd 100644
--- a/tests/unit_tests/ringct.cpp
+++ b/tests/unit_tests/ringct.cpp
@@ -289,53 +289,53 @@ TEST(ringct, range_proofs_reject_empty_zero)
EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_zero)
+TEST(ringct, range_proofs_accept_zero_zero)
{
const uint64_t inputs[] = {0};
const uint64_t outputs[] = {0};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_out_first)
+TEST(ringct, range_proofs_accept_zero_out_first)
{
const uint64_t inputs[] = {5000};
const uint64_t outputs[] = {0, 5000};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_out_last)
+TEST(ringct, range_proofs_accept_zero_out_last)
{
const uint64_t inputs[] = {5000};
const uint64_t outputs[] = {5000, 0};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_out_middle)
+TEST(ringct, range_proofs_accept_zero_out_middle)
{
const uint64_t inputs[] = {5000};
const uint64_t outputs[] = {2500, 0, 2500};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_in_first)
+TEST(ringct, range_proofs_accept_zero_in_first)
{
const uint64_t inputs[] = {0, 5000};
const uint64_t outputs[] = {5000};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_in_last)
+TEST(ringct, range_proofs_accept_zero_in_last)
{
const uint64_t inputs[] = {5000, 0};
const uint64_t outputs[] = {5000};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
-TEST(ringct, range_proofs_reject_zero_in_middle)
+TEST(ringct, range_proofs_accept_zero_in_middle)
{
const uint64_t inputs[] = {2500, 0, 2500};
const uint64_t outputs[] = {5000};
- EXPECT_TRUE(range_proof_test(false, NELTS(inputs), inputs, NELTS(outputs), outputs));
+ EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs));
}
TEST(ringct, range_proofs_reject_single_lower)