mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
bug 328780: NPE when compiler options are displayed
This commit is contained in:
parent
8bb961660c
commit
c02ebb3cb8
1 changed files with 12 additions and 8 deletions
|
@ -81,7 +81,7 @@ public class ManagedCommandLineGeneratorTest extends TestCase {
|
||||||
for( int i = 0; i < testCommandLinePatterns.length; i++ ) {
|
for( int i = 0; i < testCommandLinePatterns.length; i++ ) {
|
||||||
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL,
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL,
|
||||||
testCommandLinePatterns[i] );
|
testCommandLinePatterns[i] );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
if( i < commandLineEtalonesForPatterns.length ) {
|
if( i < commandLineEtalonesForPatterns.length ) {
|
||||||
assertEquals("i="+i, commandLineEtalonesForPatterns[i], info.getCommandLine());
|
assertEquals("i="+i, commandLineEtalonesForPatterns[i], info.getCommandLine());
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public class ManagedCommandLineGeneratorTest extends TestCase {
|
||||||
|
|
||||||
IManagedCommandLineInfo info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL,
|
IManagedCommandLineInfo info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL,
|
||||||
"${OUTPUT_FLAG} ${OUTPUT_FLAG}" );
|
"${OUTPUT_FLAG} ${OUTPUT_FLAG}" );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
assertEquals(OUTPUT_FLAG_VAL+" "+OUTPUT_FLAG_VAL, info.getCommandLine());
|
assertEquals(OUTPUT_FLAG_VAL+" "+OUTPUT_FLAG_VAL, info.getCommandLine());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,27 +101,31 @@ public class ManagedCommandLineGeneratorTest extends TestCase {
|
||||||
IManagedCommandLineGenerator gen = ManagedCommandLineGenerator.getCommandLineGenerator();
|
IManagedCommandLineGenerator gen = ManagedCommandLineGenerator.getCommandLineGenerator();
|
||||||
|
|
||||||
IManagedCommandLineInfo info = gen.generateCommandLineInfo( null, "", FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
IManagedCommandLineInfo info = gen.generateCommandLineInfo( null, "", FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
assertEquals(FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
assertEquals(FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
||||||
|
|
||||||
info = gen.generateCommandLineInfo( null, COMMAND_VAL, new String[0], OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, new String[0], OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
assertEquals(COMMAND_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
assertEquals(COMMAND_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
||||||
|
|
||||||
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, "", OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, "", OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
||||||
|
|
||||||
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, "", OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, "", OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+"\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+"\""+OUTPUT_VAL + "\""+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
||||||
|
|
||||||
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, "", INPUTS_ARRAY_VAL, null );
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, "", INPUTS_ARRAY_VAL, null );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL+" " + "\""+INPUTS_VAL + "\"", info.getCommandLine());
|
||||||
|
|
||||||
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, new String[0], null );
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, new String[0], null );
|
||||||
assertNotNull( info );
|
assertNotNull(info);
|
||||||
|
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\"", info.getCommandLine());
|
||||||
|
|
||||||
|
info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, null, null );
|
||||||
|
assertNotNull(info);
|
||||||
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\"", info.getCommandLine());
|
assertEquals(COMMAND_VAL+" "+FLAGS_VAL+" "+OUTPUT_FLAG_VAL+" "+OUTPUT_PREFIX_VAL + "\""+OUTPUT_VAL + "\"", info.getCommandLine());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue