-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some samples that would result in more then 100 percent covrage…
… before the fix
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function hitAllStatements() as dynamic | ||
loopCount = 0 | ||
for i = 0 to 10 | ||
loopCount++ | ||
end for | ||
|
||
tryAgain: | ||
if loopCount = 11 then | ||
loopCount++ | ||
goto tryAgain | ||
else if loopCount = 12 then | ||
loopCount++ | ||
goto tryAgain | ||
else | ||
loopCount++ | ||
end if | ||
|
||
while loopCount > 0 | ||
loopCount-- | ||
if loopCount = 1 then | ||
exit while | ||
end if | ||
end while | ||
|
||
obj = { | ||
one: 1 | ||
} | ||
obj["two"] = 2 | ||
obj.three = 3 | ||
|
||
for each key in obj | ||
print obj[key] | ||
end for | ||
|
||
return false | ||
end function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace tests | ||
|
||
@suite | ||
class CodeCovTests extends rooibos.BaseTestSuite | ||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
@describe("Samples for validating code coverage") | ||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
@it("tests statements for code coverage") | ||
function _() | ||
m.assertFalse(hitAllStatements()) | ||
end function | ||
|
||
end class | ||
end namespace |