Fix line numbers in error and warning messages for preprocessor messages within %inline. Also fixes __LINE__ within %inline
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12200 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a44f83cf05
commit
45601f24b4
4 changed files with 50 additions and 4 deletions
|
|
@ -11,6 +11,8 @@ public class preproc_line_file_runme {
|
|||
}
|
||||
}
|
||||
|
||||
public static String FILENAME_WINDOWS = "..\\..\\..\\..\\Examples\\test-suite\\preproc_line_file.i";
|
||||
public static String FILENAME_UNIX = "../../../../Examples/test-suite/preproc_line_file.i";
|
||||
public static void main(String argv[]) throws Throwable
|
||||
{
|
||||
int myline = preproc_line_file.MYLINE;
|
||||
|
|
@ -22,10 +24,10 @@ public class preproc_line_file_runme {
|
|||
|
||||
String myfile = preproc_line_file.MYFILE;
|
||||
String myfile_adjusted = preproc_line_file.MYFILE_ADJUSTED;
|
||||
if (!(myfile.equals("../../../../Examples/test-suite/preproc_line_file.i") || myfile.equals("..\\..\\..\\..\\Examples\\test-suite\\preproc_line_file.i")))
|
||||
if (!(myfile.equals(FILENAME_UNIX) || myfile.equals(FILENAME_WINDOWS)))
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
if (!(myfile_adjusted.equals("../../../../Examples/test-suite/preproc_line_file.i.bak") || myfile_adjusted.equals("..\\..\\..\\..\\Examples\\test-suite\\preproc_line_file.i.bak")))
|
||||
if (!(myfile_adjusted.equals(FILENAME_UNIX + ".bak") || myfile_adjusted.equals(FILENAME_WINDOWS + ".bak")))
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
if (!preproc_line_file.MY_STRINGNUM_A.equals("my15"))
|
||||
|
|
@ -48,5 +50,15 @@ public class preproc_line_file_runme {
|
|||
|
||||
if (SillyMacroClass.LINE_NUM != 45)
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
if (SillyMultipleMacroStruct.LINE_NUM != 70)
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
if (preproc_line_file.INLINE_LINE != 76)
|
||||
throw new RuntimeException("preproc failure");
|
||||
|
||||
String inlineFile = preproc_line_file.INLINE_FILE;
|
||||
if (!(inlineFile.equals(FILENAME_UNIX) || inlineFile.equals(FILENAME_WINDOWS)))
|
||||
throw new RuntimeException("preproc failure");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue