From 0caf1994dae8e88f7c219bedd87b65190b88aa89 Mon Sep 17 00:00:00 2001 From: j-james Date: Sun, 16 Oct 2022 23:58:44 -0700 Subject: Implement LL(1) parsers for HTML and CSS --- src/test/model/HtmlParserTest.java | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/test/model/HtmlParserTest.java (limited to 'src/test/model/HtmlParserTest.java') diff --git a/src/test/model/HtmlParserTest.java b/src/test/model/HtmlParserTest.java new file mode 100644 index 0000000..e83c857 --- /dev/null +++ b/src/test/model/HtmlParserTest.java @@ -0,0 +1,34 @@ +package model; + +import model.html.HtmlParser; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; + +import static org.junit.jupiter.api.Assertions.*; + +public class HtmlParserTest { + + String idiomaticHtml = "
Hello,world!
"; + String brokenHtml = "","Hello,world!","
","",""}; + System.out.println(HtmlParser.parseHtmlLL(idiomaticHtml)); +// assertEquals(HtmlParser.parseHtmlLL(idiomaticHtml), Arrays.asList(idiomaticHtmlArray)); + } + + @Test + void testBrokenHtml() { + String[] brokenHtmlArray = {"","