Modify test to prevent underflow.

This commit is contained in:
chriseth 2019-05-23 20:43:28 +02:00
parent ee7548a339
commit 73d0eb6b7a

View File

@ -1458,6 +1458,7 @@ BOOST_AUTO_TEST_CASE(mapping_state_inc_dec)
if (x > 0) table[++value] = 8;
if (x > 1) value--;
if (x > 2) table[value]++;
table[value] += 10;
return --table[value++];
}
}
@ -1474,6 +1475,7 @@ BOOST_AUTO_TEST_CASE(mapping_state_inc_dec)
value --;
if (_x > 2)
table[value]++;
table[value] += 10;
return --table[value++];
};
ALSO_VIA_YUL(