Platform { public static boolean isAnyPlatformDir(String entryName) { for (String platformDir : PLATFORM_DIRS) { if (entryName.startsWith(platformDir)) { return true; } } return false; } Platform(ID id, int bitCount); ID getId(); int getBitCount(); boolean isPlatformDir(String entryName); String truncatePlatformDir(String entryName); static boolean isAnyPlatformDir(String entryName); static Platform getCurrentPlatform();  }
@Test public void testIsAnyPlatformDir() throws Exception { assertTrue(Platform.isAnyPlatformDir("lib/win32/readme")); assertTrue(Platform.isAnyPlatformDir("lib/win32/test.dll")); assertTrue(Platform.isAnyPlatformDir("lib/win64/test.dll")); assertTrue(Platform.isAnyPlatformDir("lib/linux32/readme")); assertTrue(Platform.isAnyPlatformDir("lib/linux32/test.so")); assertTrue(Platform.isAnyPlatformDir("lib/linux32/test.so")); assertTrue(Platform.isAnyPlatformDir("lib/macosx32/readme")); assertTrue(Platform.isAnyPlatformDir("lib/macosx32/test.jnilib")); assertTrue(Platform.isAnyPlatformDir("lib/macosx64/test.jnilib")); assertFalse(Platform.isAnyPlatformDir("win32/test.dll")); assertFalse(Platform.isAnyPlatformDir("linux32/readme")); assertFalse(Platform.isAnyPlatformDir("macosx64/test.jnilib")); }