-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
#Overview
All switch statements should be instrumented with calls to the control flow logger. Imminently before the switch statement a call to instrumenter.setFalse() should be made, setting all interior case and default statements to false. Inside of each case and default statement a call to instrumenter.setTrue() should be made indicating the path that was taken.
#Example
The following example takes place in a file source.go in package main
##Pre instrumentation
#!go
0 switch( conditional ){
1 case: "Canada"
2 harper()
3 case: "Russia"
4 putin()
5 default:
6 illuminati()
7 }
##Post Instrumentation
#!go
0 instrumenter.Cflogger.setFalse("main_source_switch_0")
1 switch( conditional ){
2 case: "Canada"
3 instrumenter.Cflogger.setTrue("main_source_case_1")
4 harper()
5 case: "Russia"
6 instrumenter.Cflogger.setTrue("main_source_case_3")
7 putin()
8 default:
9 instrumenter.Cflogger.setTrue("main_source_default_5")
10 illuminati()
11 }
[Issue created by wantonsolutions: 2015-08-21]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working