mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Cosmetic changes to unit test
Instead of using assertTrue, but assertEquals we get nice error messages that show the contents of the collections. Using assertEquals(List.of() instead of assertArrayEquals(... because that gives nicer error messages. Part of #117
This commit is contained in:
parent
542e8b474e
commit
71eae6c2d3
1 changed files with 6 additions and 4 deletions
|
@ -14,6 +14,8 @@
|
|||
package org.eclipse.cdt.make.scannerdiscovery;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCProjectNature;
|
||||
|
@ -80,9 +82,9 @@ public class ScannerConfigDiscoveryTests extends BaseTestCase {
|
|||
IScannerInfo scInfo = CCorePlugin.getDefault().getScannerInfoProvider(fCProject).getScannerInformation(fCFile);
|
||||
assertNotNull(scInfo);
|
||||
String[] includes = scInfo.getIncludePaths();
|
||||
assertTrue(includes.length == 0);
|
||||
assertEquals(List.of(), Arrays.asList(includes));
|
||||
Map<String, String> symbols = scInfo.getDefinedSymbols();
|
||||
assertTrue(symbols.isEmpty());
|
||||
assertEquals(Map.of(), symbols);
|
||||
}
|
||||
|
||||
public void testGetCCCompilerBuiltins() throws CoreException {
|
||||
|
@ -94,9 +96,9 @@ public class ScannerConfigDiscoveryTests extends BaseTestCase {
|
|||
IScannerInfo scInfo = CCorePlugin.getDefault().getScannerInfoProvider(fCProject).getScannerInformation(fCFile);
|
||||
assertNotNull(scInfo);
|
||||
String[] includes = scInfo.getIncludePaths();
|
||||
assertTrue(includes.length == 0);
|
||||
assertEquals(List.of(), Arrays.asList(includes));
|
||||
Map<String, String> symbols = scInfo.getDefinedSymbols();
|
||||
assertTrue(symbols.isEmpty());
|
||||
assertEquals(Map.of(), symbols);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue