public void MatchFormatTest() { var parts = MipsAssembler.Matcher("%d, %s, %t", " r1, r2, r3 "); Assert.Equal(3, parts.Count); Assert.Equal("r1", parts["%d"]); Assert.Equal("r2", parts["%s"]); Assert.Equal("r3", parts["%t"]); }
public void MatcherNoMatchTest() { Assert.Throws <Exception>(() => { MipsAssembler.Matcher("add %s, %t", "add 1, 2, 3"); }); }