diff --git a/distribution/ReleaseNotes.txt b/distribution/ReleaseNotes.txt index 33ddd0e85..9aabc57a5 100644 --- a/distribution/ReleaseNotes.txt +++ b/distribution/ReleaseNotes.txt @@ -8,7 +8,7 @@ HEAD, planned as v0.13 CAUTION: All default values are lost! If you have built a circuit that contains test cases that depend on a non-null default value, this tests will fail. To resolve this issue, reset the default value. -- added an enable input to the T flip-flop +- Added an enable input to the T flip-flop CAUTION: By default this input is activated now. In circuits which used the T flip-flop in the past, the new input needs to be disabled. - A warning message shows up if a circuit with unnamed inputs is analysed. diff --git a/src/test/java/de/neemann/digital/analyse/parser/ParserTest.java b/src/test/java/de/neemann/digital/analyse/parser/ParserTest.java index 50abc7ab3..b87366bab 100644 --- a/src/test/java/de/neemann/digital/analyse/parser/ParserTest.java +++ b/src/test/java/de/neemann/digital/analyse/parser/ParserTest.java @@ -74,8 +74,8 @@ public class ParserTest extends TestCase { public void testParseLet() throws Exception { Expression exp = createSingle("let u=a+b"); assertTrue(exp instanceof NamedExpression); - assertEquals("u", ((NamedExpression)exp).getName()); - assertTrue(((NamedExpression)exp).getExpression() instanceof Operation.Or); + assertEquals("u", ((NamedExpression) exp).getName()); + assertTrue(((NamedExpression) exp).getExpression() instanceof Operation.Or); } public void testParseLetError() throws Exception { @@ -95,6 +95,20 @@ public class ParserTest extends TestCase { assertEquals(new Variable("c"), expList.get(2)); } + public void testParseList2() throws Exception { + ArrayList expList = new Parser("let u=a,let v=b,let w=c").parse(); + assertEquals(3, expList.size()); + assertTrue(expList.get(0) instanceof NamedExpression); + assertEquals(((NamedExpression) expList.get(0)).getName(), "u"); + assertEquals(((NamedExpression) expList.get(0)).getExpression(), new Variable("a")); + assertTrue(expList.get(1) instanceof NamedExpression); + assertEquals(((NamedExpression) expList.get(1)).getName(), "v"); + assertEquals(((NamedExpression) expList.get(1)).getExpression(), new Variable("b")); + assertTrue(expList.get(2) instanceof NamedExpression); + assertEquals(((NamedExpression) expList.get(2)).getName(), "w"); + assertEquals(((NamedExpression) expList.get(2)).getExpression(), new Variable("c")); + } + public void testParseRegression() throws Exception { Expression e = createSingle("B*(B+A)*(B+C)*(A+B+C)"); Expression simplified = QuineMcCluskey.simplify(e);