Skip to content
Snippets Groups Projects
Commit db4a8b1a authored by vincent's avatar vincent
Browse files

[BTC Language] Add test for OP_FALSE

	* OP_FALSE is supposed to be different from '00'
parent c46fcf94
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,14 @@ TESTING_SCENARII = [
[[0, 0, 0, 0], []],
False,
),
TestScenario(
"OP_FALSE_02",
"01000087",
"00 OP_FALSE OP_EQUAL",
"[0: PushDataOperator(00), 1: PushDataOperator(0), 2: ArithmeticOperator(==), 3: UnconditionalJump(4), 4: UnconditionalJump(inf)]",
[[0], []],
False,
),
*[
TestScenario(
f"OP_{i}",
......@@ -442,6 +450,14 @@ TESTING_SCENARII = [
[[1, 2, 3, 4, 5, 4], []],
None,
),
TestScenario(
"CONSTANT_00",
"010001800181024001",
"00 80 81 4001",
"[0: PushDataOperator(00), 1: PushDataOperator(80), 2: PushDataOperator(81), 3: PushDataOperator(4001), 4: UnconditionalJump(5), 5: UnconditionalJump(inf)]",
[[0, 0, -1, 320], []],
None,
),
TestScenario(
"COSNTANT_00",
"010001800181024001",
......@@ -451,6 +467,3 @@ TESTING_SCENARII = [
None,
),
]
# TODO Add scenario: OP_FALSE is empty vector in implementation. Thus, 01 00 OP_FALSE OP_EQUAL should return FALSE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment