-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9e66c9
commit 18fdb03
Showing
3 changed files
with
125 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/fsa/TrimTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package it.unive.lisa.analysis.string.fsa; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
import org.junit.Test; | ||
|
||
public class TrimTest { | ||
|
||
@Test | ||
public void test01() { | ||
SimpleAutomaton a = new SimpleAutomaton(" a "); | ||
assertTrue(a.trim().isEqualTo(new SimpleAutomaton("a"))); | ||
} | ||
|
||
@Test | ||
public void test02() { | ||
SimpleAutomaton b = new SimpleAutomaton(" a ").union(new SimpleAutomaton(" b ")); | ||
assertTrue(b.trim().isEqualTo(new SimpleAutomaton("a").union(new SimpleAutomaton("b")))); | ||
} | ||
|
||
@Test | ||
public void test03() { | ||
SimpleAutomaton c = new SimpleAutomaton("a").union(new SimpleAutomaton(" b ")); | ||
assertTrue(c.trim().isEqualTo(new SimpleAutomaton("a").union(new SimpleAutomaton("b")))); | ||
} | ||
|
||
@Test | ||
public void test04() { | ||
SimpleAutomaton c = new SimpleAutomaton(" a ").star(); | ||
assertTrue(c.trim().isEqualTo(new SimpleAutomaton("a").star())); | ||
} | ||
} |