forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsomorphicTest.java
More file actions
31 lines (23 loc) · 833 Bytes
/
IsomorphicTest.java
File metadata and controls
31 lines (23 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.thealgorithms.strings;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
public final class IsomorphicTest {
private IsomorphicTest() {
}
@Test
public static void main(String[] args) {
String str1 = "abbbbaac";
String str2 = "kffffkkd";
String str3 = "xyxyxy";
String str4 = "bnbnbn";
String str5 = "ghjknnmm";
String str6 = "wertpopo";
String str7 = "aaammmnnn";
String str8 = "ggghhhbbj";
assertTrue(Isomorphic.checkStrings(str1, str2));
assertTrue(Isomorphic.checkStrings(str3, str4));
assertFalse(Isomorphic.checkStrings(str5, str6));
assertFalse(Isomorphic.checkStrings(str7, str8));
}
}