-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring back positive version of default-switch.p4 test
- Loading branch information
Showing
9 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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,9 @@ | ||
default-last-switch.p4(11): [--Werror=invalid] error: switch label b follows 'default' label, which is not allowed. | ||
switch (t.apply().action_run) { | ||
^^^^^^ | ||
default-last-switch.p4(13) | ||
b: { return; } | ||
^ | ||
default-last-switch.p4(12) | ||
default: | ||
^^^^^^^ |
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
control ctrl() { | ||
action a() {} | ||
action b() {} | ||
|
||
table t { | ||
actions = { a; b; } | ||
default_action = a; | ||
} | ||
|
||
apply { | ||
switch (t.apply().action_run) { | ||
b: | ||
default: { return; } | ||
} | ||
} | ||
} |
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,22 @@ | ||
control ctrl() { | ||
action a() { | ||
} | ||
action b() { | ||
} | ||
table t { | ||
actions = { | ||
a(); | ||
b(); | ||
} | ||
default_action = a(); | ||
} | ||
apply { | ||
switch (t.apply().action_run) { | ||
b: | ||
default: { | ||
return; | ||
} | ||
} | ||
} | ||
} | ||
|
Empty file.
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,22 @@ | ||
control ctrl() { | ||
action a() { | ||
} | ||
action b() { | ||
} | ||
table t { | ||
actions = { | ||
a; | ||
b; | ||
} | ||
default_action = a; | ||
} | ||
apply { | ||
switch (t.apply().action_run) { | ||
b: | ||
default: { | ||
return; | ||
} | ||
} | ||
} | ||
} | ||
|
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,4 @@ | ||
default-switch.p4(1): [--Wwarn=unused] warning: Control ctrl is not used; removing | ||
control ctrl() { | ||
^^^^ | ||
[--Wwarn=missing] warning: Program does not contain a `main' module |