From 97e2dbc5ce4cb4aea858facd0e0e7b24d8ea3ce0 Mon Sep 17 00:00:00 2001 From: Scott Blomquist Date: Fri, 15 Dec 2023 14:43:26 -0800 Subject: [PATCH] Vastly improved unit test coverage and consistency --- RegExtract.Test/RegExtract.Test.csproj | 6 +- RegExtract.Test/Usage.cs | 137 ++++++++++++++++++------- 2 files changed, 105 insertions(+), 38 deletions(-) diff --git a/RegExtract.Test/RegExtract.Test.csproj b/RegExtract.Test/RegExtract.Test.csproj index cd08aae..be9a6c4 100644 --- a/RegExtract.Test/RegExtract.Test.csproj +++ b/RegExtract.Test/RegExtract.Test.csproj @@ -8,13 +8,13 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/RegExtract.Test/Usage.cs b/RegExtract.Test/Usage.cs index 1e66fae..7cd46d5 100644 --- a/RegExtract.Test/Usage.cs +++ b/RegExtract.Test/Usage.cs @@ -25,15 +25,21 @@ public Usage(ITestOutputHelper output) [Fact] public void a001() { - var str = ExtractionPlan>.CreatePlan(new Regex(@"((\w)(\w))+")).ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"((\w)(\w))+"); + + var result = plan.Extract( @"abcdef"); + + Assert.Equal(result, [('a', 'b'), ('c', 'd'), ('e', 'f')]); } [Fact] public void a002() { - var str = ExtractionPlan>.CreatePlan(new Regex(@"((\d+) ?)+")).ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"((\d+) ?)+"); + + var result = plan.Extract(@"123 456 789"); + + Assert.Equal(result, [123, 456, 789]); } record game(int id, List draws); @@ -42,90 +48,94 @@ record draw(List<(int count, string color)> colors); [Fact] public void a003() { - var plan = ExtractionPlan.CreatePlan(new Regex(@"Game (\d+): (((\d+) (\w+),? ?)+;? ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan(/* language=regex */@"Game (\d+): (((\d+) (\w+),? ?)+;? ?)+"); + + var result = plan.Extract("Game 31: 9 blue, 6 red, 7 green; 20 red, 1 green, 15 blue"); - var result = plan.Extract("Game 31: 9 blue, 6 red, 7 green; 20 red, 1 green, 15 blue; 6 blue, 7 green, 17 red; 2 blue, 3 green, 6 red; 1 red, 3 blue, 2 green; 5 green, 18 red, 6 blue"); + Assert.Equivalent(result, new game(31, [new draw([(9, "blue"), (6, "red"), (7, "green")]), new draw([(20, "red"), (1, "green"), (15, "blue")])])); } [Fact] public void a004() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"(([RL])(\d+),? ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"(([RL])(\d+),? ?)+"); var result = plan.Extract("R8, R4, L4, R8"); + + Assert.Equal(result, [('R', 8), ('R', 4), ('L', 4), ('R', 8)]); } [Fact] public void a005() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"((...) = \(((...), (...))\);? ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"((...) = \(((...), (...))\);? ?)+"); var result = plan.Extract(@"AAA = (BBB, CCC); BBB = (DDD, EEE)"); + + var expected = new Dictionary + { + ["AAA"] = ("BBB", "CCC"), + ["BBB"] = ("DDD", "EEE") + }; + + Assert.Equal(expected, result); } [Fact] public void a006() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"((\d+) ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"((\d+) ?)+"); var result = plan.Extract("123 456 789"); + + Assert.Equal([123, 456, 789], result); } [Fact] public void a007() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"(?:(\d+) ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"(?:(\d+) ?)+"); var result = plan.Extract("123 456 789"); + + Assert.Equal([123, 456, 789], result); } [Fact] public void a008() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"(\d+ ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"(\d+ ?)+"); var result = plan.Extract("123 456 789"); + + Assert.Equal([123, 456, 789], result); } [Fact] public void a009() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"(([a-z]+)([=-][0-9]?),?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>(/* language=regex */@"(([a-z]+)([=-][0-9]?),?)+"); var result = plan.Extract(@"rn=1,cm-,qp=3,cm=2,qp-,pc=4,ot=9,ab=5,pc-,pc=6,ot=7"); + + Assert.Equal([("rn", "=1"), ("cm", "-"), ("qp", "=3"), ("cm", "=2"), ("qp", "-"), ("pc", "=4"), ("ot", "=9"), ("ab", "=5"), ("pc", "-"), ("pc", "=6"), ("ot", "=7")], result); } [Fact] public void a010() { - var plan = ExtractionPlan>>>.CreatePlan(new Regex(@"(((\w)+ ?)+,? ?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = CreateAndLogPlan>>>(/* language=regex */@"(((\w)+ ?)+,? ?)+"); var result = plan.Extract(@"asdf lkj, wero oiu"); + + Assert.Equal([[['a', 's', 'd', 'f'], ['l', 'k', 'j']], [['w', 'e', 'r', 'o'], ['o', 'i', 'u']]], result); } [Fact] public void slow() { - var plan = ExtractionPlan>.CreatePlan(new Regex(@"(([a-z]+)([=-].?),?)+")); - var str = plan.ToString("x"); - output.WriteLine(str); + var plan = ExtractionPlan>.CreatePlan(new Regex(/* language=regex */@"(([a-z]+)([=-].?),?)+")); var result = plan.Extract(@"tp-,pnm-,vrg-,nfk=6,qqc=2,zs=2,hm-,xnl=4,fszj=6,cx=7,zpfsz-,hdg=9,nqqm-,nfk-,pb-,cbn=5,ng=8,pdk=4,rd=7,sl=2,qtk=7,fkdp-,dxkx-,qc=9,dxtz-,bgzmkc-,jzv-,ljd-,nbh=7,dtr-,sbd=5,zt=2,zgj-,rbpq=7,vm=6,gq=3,qnjfm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=5,srn=9,stldk=5,kqkl-,bf=1,dhb-,ngfn-,ftdll=1,xd-,hprc=2,nng-,rcb=3,dsg=9,cbbt=3,fkdp-,bq=7,tkpp-,dtjxv-,hxd=1,rg-,rs=7,gg-,jbf=8,nvc-,jxxhbv-,dxtz-,fkdp-,gjtf-,ll-,xz-,bfq=6,rt=7,mfnkh=1,hdt-,cv-,hbp=7,hxd=1,gl=6,nsl-,ftdll=7,zbb-,vb-,zqsd=1,qjv=6,ng-,nvc-,zs-,zfh-,lnh=3,hxd-,lbng-,ctz-,knf-,jzd-,mqg-,gxkv-,pc=1,hc-,qxg-,dtr-,dkp-,hl=5,xdqd-,rk-,mtr-,qjv=9,lv-,vpk=7,hjq-,mvgfg=4,sqz=8,ng-,jxxhbv=7,zxm=1,kjzsmv-"); } @@ -255,6 +265,8 @@ public void can_extract_mondo_conditional_regex() var result = "hgt:61in iyr:2014 pid:916315544 hcl:#733820 ecl:oth".Extract(mondoString,RegexOptions.IgnorePatternWhitespace); + Assert.Equal(new Passport { hgt = "61in", iyr = 2014, pid = "916315544", hcl = "#733820", ecl = "oth" }, result); + //TODO: this was the only test using the `this Match` extension for Extract. Should re-add one. } @@ -273,34 +285,52 @@ public void can_extract_capture_collections_to_lists() var regex = @"^(?.+) bags contain(?: (?no more bags\.)| (?\d+) (?[^,.]*) bag[s]?[,.])+$"; var output = line.Extract(regex); + + Assert.Equivalent(new Container + { + container = "faded yellow", + count = new List { 4, 4, 3, 5 }, + bag = new List { "mirrored fuchsia", "dotted indigo", "faded orange", "plaid crimson" }, + none = null + }, output); } [Fact] public void can_extract_single_item() { var output = "asdf".Extract("(.*)"); - Assert.Equal("asdf", output); + Assert.Equal(output, "asdf"); var n = "2023".Extract(@"(\d+)"); - Assert.Equal(2023, n); + Assert.Equal(n, 2023); } [Fact] public void can_extract_multimatch_to_list() { var result = "123 456 789".Extract> (@"(?:(\d+) ?)+"); + + Assert.Equal([123, 456, 789], result); } [Fact] public void can_extract_multimatch_to_hashset() { var result = "123 456 789".Extract>(@"(?:(\d+) ?)+"); + + Assert.Equal(new HashSet { 123, 456, 789 }, result); } [Fact] public void can_extract_alternation_to_tuple() { var result = "asdf".Extract<(int?, string)>(@"(\d+)|(.*)"); + + Assert.Equal((null, "asdf"), result); + + result = "123".Extract<(int?, string)>(@"(\d+)|(.*)"); + + Assert.Equal((123, null), result); } record Alternation(int? n, string s); @@ -315,13 +345,20 @@ record NamedAlternation public void can_extract_alternation_to_record() { var result = "asdf".Extract(@"(\d+)|(.*)"); + + Assert.Equal(new Alternation(null, "asdf"), result); + var result_named = "asdf".Extract(@"(?\d+)|(?.*)"); + + Assert.Equal(new NamedAlternation { n = null, s = "asdf" }, result_named); } [Fact] public void can_extract_enum() { var result = "Asynchronous,Encrypted".Extract(@".*"); + + Assert.Equal(System.IO.FileOptions.Asynchronous | System.IO.FileOptions.Encrypted, result); } record WithTemplate(string op, int arg) @@ -334,6 +371,8 @@ record WithTemplate(string op, int arg) public void can_extract_with_template() { var result = "acc +7".Extract(); + + Assert.Equal(new WithTemplate("acc", 7), result); } const RegexOptions opts = RegexOptions.IgnoreCase|RegexOptions.Multiline; @@ -342,6 +381,7 @@ public void can_extract_with_template() public void can_extract_to_string_constructor() { var result = "https://www.google.com/ 12345".Extract<(Uri,int)>(@"(.*) (\d+)"); + Assert.Equal((new Uri("https://www.google.com/"), 12345), result); } [Fact] @@ -356,6 +396,8 @@ record bounds(int lo, int hi); public void nested_extraction() { var result = "2-12 c: abcdefg".Extract<(bounds, char, string)>(@"((\d+)-(\d+)) (.): (.*)"); + + Assert.Equal((new bounds(2, 12), 'c', "abcdefg"), result); } [Fact] @@ -367,6 +409,8 @@ public void nested_extraction_of_list() output.WriteLine(str); var result = plan.Extract("The quick brown fox jumps over the lazy dog."); + + Assert.Equal([['T', 'h', 'e'], ['q', 'u', 'i', 'c', 'k'], ['b', 'r', 'o', 'w', 'n'], ['f', 'o', 'x'], ['j', 'u', 'm', 'p', 's'], ['o', 'v', 'e', 'r'], ['t', 'h', 'e'], ['l', 'a', 'z', 'y'], ['d', 'o', 'g']], result); } [Fact] @@ -378,6 +422,8 @@ public void harder_nested_extraction_of_list() output.WriteLine(str); var result = plan.Extract("asdf lkj, wero oiu"); + + Assert.Equal([[['a', 's', 'd', 'f'], ['l', 'k', 'j']], [['w', 'e', 'r', 'o'], ['o', 'i', 'u']]], result); } [Fact] @@ -387,6 +433,8 @@ public void nested_extraction_of_bags() var regex = @"^(.+) bags contain(?: (no more bags\.)| ((\d+) ([^,.]*)) bag[s]?[,.])+$"; var output = line.Extract<(string,string,List<(int,string)>)>(regex); + + Assert.Equivalent(("faded yellow", default(string), new List<(int, string)> { (4, "mirrored fuchsia"), (4, "dotted indigo"), (3, "faded orange"), (5, "plaid crimson") }), output); } [Fact] @@ -396,6 +444,8 @@ public void extraction_plan() var match = regex.Match("2-12 c: abcdefg"); var plan = ExtractionPlan<((int, int), char, string)>.CreatePlan(regex); var result = plan.Extract(match); + + Assert.Equal(((2, 12), 'c', "abcdefg"), result); } [Fact] @@ -443,6 +493,8 @@ public void debug() Regex rx; var plan = ExtractionPlan.CreatePlan(rx = new Regex(@"^(?.+) bags contain(?: (?no other bags)\.| (?(\d+) (.*?)) bags?[,.])+$")); var result = plan.Extract(rx.Match("faded yellow bags contain 4 mirrored fuchsia bags, 4 dotted indigo bags, 3 faded orange bags, 5 plaid crimson bags.")); + + Assert.Equivalent(new bagdescription { name = "faded yellow", contents = new List { new includedbags(4, "mirrored fuchsia"), new includedbags(4, "dotted indigo"), new includedbags(3, "faded orange"), new includedbags(5, "plaid crimson") } }, result); } record bagdescription @@ -466,11 +518,18 @@ public void CreateTreePlan() result = plan2.Extract(regex.Match("The quick brown fox jumps over the lazy dog")); } + [Fact] + public void deep_tuple_type_tree() + { + var plan = CreateAndLogPlan<(int, (int, int), int, int, int, int, (int, (List, int)), int, int, int, int, int, int, int, int)>(@"(\d+) ((\d+) (\d+)) (\d+) (\d+) (\d+) (\d+) ((\d+) ((\d+ ?)+ (\d+))) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+)"); + } + [Fact] public void can_create_polymorphic_parse_plan() { - var plan = ExtractionPlan.CreatePlan(new Regex(@"(.*)")); + var plan = CreateAndLogPlan(@"(.*)"); var results = plan.Extract("mask = lkjasdf"); + Assert.Equal(new maskinstr("lkjasdf"), results); } record instr() @@ -489,6 +548,14 @@ public static instr Parse(string str) } record maskinstr(string mask) : instr; record meminstr(long loc, long val) : instr; + + private ExtractionPlan CreateAndLogPlan(string v) + { + var plan = ExtractionPlan.CreatePlan(new Regex(v)); + output.WriteLine(plan.ToString("x")); + + return plan; + } } }