Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit tests for preprocessor's macro concat operator.
These fail at the moment.
- Loading branch information
Showing
7 changed files
with
21 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
RIGHT |
6 changes: 6 additions & 0 deletions
6
unit_tests/preprocessor/output/concat-operator-define-override
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,6 @@ | ||
// This should produce "RIGHT" and not "WRONG" | ||
#define RI WR | ||
#define GHT ONG | ||
#define REPLACE(RI, GHT) RI##GHT | ||
REPLACE(RI, GHT) | ||
|
1 change: 1 addition & 0 deletions
1
unit_tests/preprocessor/output/concat-operator-define-override.correct
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 @@ | ||
RIGHT |
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 @@ | ||
/* This should produce "RIGHT" instead of "RI ## G ## HT" */ | ||
#define x(a,b) a##G##b | ||
x(RI, HT) | ||
|
1 change: 1 addition & 0 deletions
1
unit_tests/preprocessor/output/concat-operator-multiple.correct
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 @@ | ||
RIGHT |
7 changes: 7 additions & 0 deletions
7
unit_tests/preprocessor/output/concat-operator-stacked-override
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,7 @@ | ||
// This should produce "RIGHT" and not "WRONG" | ||
#define WR RI | ||
#define ONG GHT | ||
#define REPLACE(WR, ONG) WR##ONG | ||
#define REPLACE2(WR, ONG) REPLACE(WR, ONG) | ||
REPLACE2(WR, ONG) | ||
|
1 change: 1 addition & 0 deletions
1
unit_tests/preprocessor/output/concat-operator-stacked-override.correct
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 @@ | ||
RIGHT |