Adria Massanet
fbfd049f06
eslint-ed
8 years ago
Adria Massanet
da24a90e0d
Allows contract inheritance
8 years ago
Alex Rea
500cbd6f29
Remove the 'instrumenting' flag
8 years ago
Alex Rea
5ee149775f
Move parse and injector into own files
8 years ago
Alex Rea
4848f458f7
Tie everything to the same 'contract' object
8 years ago
Alex Rea
6563906fed
Remove closeBracket event types
...
These situations are now dealt with by the preprocessor.
8 years ago
cgewecke
c782afa322
Add unit tests for ConditionalExpression
8 years ago
Alex Rea
f90674bd82
Fix cyclomatic complexity
8 years ago
Alex Rea
6239706e04
1 (cyclomatic complexity) error remains
8 years ago
Alex Rea
db4dd954ef
Drop down to 70 issues
8 years ago
Alex Rea
804c5fb428
Change approach to instrumentation of statements
...
Previously, we traversed the whole AST, and when we encountered a
statement we checked if we could instrument it i.e. if it was
standalone. This introduced a bunch of cases that we wanted to check
(is it in a block? it is immediately after a block? etc.) and some edge
cases that didn’t work properly (comments).
Instead, this stops traversing the AST in situations where we know we
can’t instrument. We can’t instrument `f(x)` easily (see below) in
these situations, so we don’t traverse them:
* `if (f(x))`
* `arr[f(x)`
* `var x = f(x)`
* `g(f(x))`
Of course, going forward we might ‘decide’ that we *can* in fact
instrument these. e.g. `arr[f(x)]` could be replaced by
```
var _some_unique_id = f(x);
arr[_some_unique_id];
```
and then instrumented as appropriate.
8 years ago
Alex Rea
4f1ad6e133
First crack at improving statement coverage accuracy
8 years ago
Alex Rea
50570c8b24
Instrument statements after a closing brace
8 years ago
cgewecke
24756e3980
Istanbul-style tests ( #13 ), fix If bug ( #26 ), loop statement support ( #27 )
8 years ago
cgewecke
2490170aac
Handle empty function body edge case
8 years ago
cgewecke
f58b3bd99b
Switch from solparse to solidity-parser
8 years ago
cgewecke
82ac391803
Check for null argument in returnStatement parsing
8 years ago
cgewecke
971e65272d
Fix injection issue with else statements without brackets
8 years ago
cgewecke
fe151dacba
Remove newline condition for statement coverage
8 years ago
cgewecke
d5cce3bf35
Adds unhandled expression types
8 years ago
Alex Rea
66e46a0d95
Fix if statements
...
With tests to prove it! Hopefully the start of a long, good, habit...
8 years ago
Alex Rea
22cdaa16ec
Remove newline from branchCoverage
...
Messes up ternary statements
8 years ago
Alex Rea
6f433e1e47
Add DenominationLiteral
8 years ago
Alex Rea
0b2dbc4dc1
Accommodate more if statement possibilities
8 years ago
Alex Rea
bcc00ec9a6
Accommodate 'if () doThing()' construct
...
Previously, brackets were assumed to be present
8 years ago
Alex Rea
c1fcb0b522
DRYer code
8 years ago
Alex Rea
bfe60ba12a
Add statement coverage!
8 years ago
Alex Rea
2197678cb5
Fix instrumenting lines preceeded by comments
8 years ago
Alex Rea
1644682628
Fix double-instrumenting line count
8 years ago
Alex Rea
c564ad7a4a
Instrument ternary operators
8 years ago
Alex Rea
ca3e269685
Fix if.. else if .. coverage
8 years ago
Alex Rea
6d4dece7ad
Correct line instrumentation (almost)
8 years ago
Alex Rea
e7fd337fe8
Mostly branches
8 years ago
Alex Rea
169c330dc5
Fix mapping of functions
8 years ago
Alex Rea
c6db87ff44
Add function tracking
8 years ago
Alex Rea
b5ca8b3da8
Works!
8 years ago
Alex Rea
165694d3cf
Second commit
8 years ago
Alex Rea
3a7a70fe21
First commit
8 years ago