You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
492 B
22 lines
492 B
8 years ago
|
/*
|
||
|
Library and Using statements: invoking 'Test.not' should generate line and statement
|
||
|
coverage for L 9, 10, and 19, plus function coverage for 'flip' and 'not'.
|
||
|
*/
|
||
|
library Boolean {
|
||
|
struct Value { bool val; }
|
||
|
|
||
|
function flip(Value storage self) internal returns (bool) {
|
||
|
self.val = !self.val;
|
||
|
return self.val;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
contract Test {
|
||
|
using Boolean for Boolean.Value;
|
||
|
Boolean.Value b;
|
||
|
|
||
|
function not() returns (bool) {
|
||
|
return b.flip();
|
||
|
}
|
||
|
}
|