示例#1
0
        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"]);
        }
示例#2
0
 public void MatcherNoMatchTest()
 {
     Assert.Throws <Exception>(() => { MipsAssembler.Matcher("add %s, %t", "add 1, 2, 3"); });
 }