Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed Dec 25, 2019
1 parent a5c0ef6 commit 8bc1e8f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/test/java/org/jd/core/v1/ClassFileToJavaSourceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2637,9 +2637,12 @@ public void testJdk901InterfaceWithDefaultMethods() throws Exception {
assertTrue(source.matches(PatternMaker.make(": 24 */", "return unsafeGetZoneId(zoneString);")));
assertTrue(source.matches(PatternMaker.make(": 26 */", "System.err.println(\"Invalid time zone: \" + zoneString + \"; using default time zone instead.\");")));
assertTrue(source.matches(PatternMaker.make(": 27 */", "return ZoneId.systemDefault();")));
assertTrue(source.matches(PatternMaker.make(": 32 */", "default ZonedDateTime getZonedDateTime(String zoneString) { return getZonedDateTime(getLocalDateTime(), getZoneId(zoneString)); }")));
assertTrue(source.matches(PatternMaker.make(": 36 */", "private static ZoneId unsafeGetZoneId(String zoneString) { return ZoneId.of(zoneString); }")));
assertTrue(source.matches(PatternMaker.make(": 40 */", "private ZonedDateTime getZonedDateTime(LocalDateTime localDateTime, ZoneId zoneId) { return ZonedDateTime.of(localDateTime, zoneId); }")));
assertTrue(source.matches(PatternMaker.make("default ZonedDateTime getZonedDateTime(String zoneString)")));
assertTrue(source.matches(PatternMaker.make(": 32 */", "return getZonedDateTime(getLocalDateTime(), getZoneId(zoneString));")));
assertTrue(source.matches(PatternMaker.make("private static ZoneId unsafeGetZoneId(String zoneString)")));
assertTrue(source.matches(PatternMaker.make(": 36 */", "return ZoneId.of(zoneString);")));
assertTrue(source.matches(PatternMaker.make("private ZonedDateTime getZonedDateTime(LocalDateTime localDateTime, ZoneId zoneId)")));
assertTrue(source.matches(PatternMaker.make(": 40 */", "return ZonedDateTime.of(localDateTime, zoneId);")));

assertTrue(source.indexOf("// Byte code:") == -1);

Expand Down

0 comments on commit 8bc1e8f

Please sign in to comment.