mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
unit_tests: do not ASSERT_TRUE(decodeRct(...))
decodeRct returns the amount, which may be zero
This commit is contained in:
parent
35d5aa36c9
commit
ab2e9953b4
1 changed files with 5 additions and 5 deletions
|
@ -177,7 +177,7 @@ TEST(ringct, range_proofs)
|
||||||
ASSERT_TRUE(verRct(s));
|
ASSERT_TRUE(verRct(s));
|
||||||
|
|
||||||
//decode received amount
|
//decode received amount
|
||||||
ASSERT_TRUE(decodeRct(s, amount_keys[1], 1, mask));
|
decodeRct(s, amount_keys[1], 1, mask);
|
||||||
|
|
||||||
// Ring CT with failing MG sig part should not verify!
|
// Ring CT with failing MG sig part should not verify!
|
||||||
// Since sum of inputs != outputs
|
// Since sum of inputs != outputs
|
||||||
|
@ -194,7 +194,7 @@ TEST(ringct, range_proofs)
|
||||||
ASSERT_FALSE(verRct(s));
|
ASSERT_FALSE(verRct(s));
|
||||||
|
|
||||||
//decode received amount
|
//decode received amount
|
||||||
ASSERT_TRUE(decodeRct(s, amount_keys[1], 1, mask));
|
decodeRct(s, amount_keys[1], 1, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ringct, range_proofs_with_fee)
|
TEST(ringct, range_proofs_with_fee)
|
||||||
|
@ -241,7 +241,7 @@ TEST(ringct, range_proofs_with_fee)
|
||||||
ASSERT_TRUE(verRct(s));
|
ASSERT_TRUE(verRct(s));
|
||||||
|
|
||||||
//decode received amount
|
//decode received amount
|
||||||
ASSERT_TRUE(decodeRct(s, amount_keys[1], 1, mask));
|
decodeRct(s, amount_keys[1], 1, mask);
|
||||||
|
|
||||||
// Ring CT with failing MG sig part should not verify!
|
// Ring CT with failing MG sig part should not verify!
|
||||||
// Since sum of inputs != outputs
|
// Since sum of inputs != outputs
|
||||||
|
@ -258,7 +258,7 @@ TEST(ringct, range_proofs_with_fee)
|
||||||
ASSERT_FALSE(verRct(s));
|
ASSERT_FALSE(verRct(s));
|
||||||
|
|
||||||
//decode received amount
|
//decode received amount
|
||||||
ASSERT_TRUE(decodeRct(s, amount_keys[1], 1, mask));
|
decodeRct(s, amount_keys[1], 1, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ringct, simple)
|
TEST(ringct, simple)
|
||||||
|
@ -316,7 +316,7 @@ TEST(ringct, simple)
|
||||||
ASSERT_TRUE(verRctSimple(s));
|
ASSERT_TRUE(verRctSimple(s));
|
||||||
|
|
||||||
//decode received amount corresponding to output pubkey index 1
|
//decode received amount corresponding to output pubkey index 1
|
||||||
ASSERT_TRUE(decodeRctSimple(s, amount_keys[1], 1, mask));
|
decodeRctSimple(s, amount_keys[1], 1, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static rct::rctSig make_sample_rct_sig(int n_inputs, const uint64_t input_amounts[], int n_outputs, const uint64_t output_amounts[], bool last_is_fee)
|
static rct::rctSig make_sample_rct_sig(int n_inputs, const uint64_t input_amounts[], int n_outputs, const uint64_t output_amounts[], bool last_is_fee)
|
||||||
|
|
Loading…
Reference in a new issue