Inheritance: SimpleCommentSampleScanner
コード例 #1
0
        public void is_at_end()
        {
            var scanner = new CLangSampleScanner("cs", "csharp");
            scanner.IsAtEnd("// ENDSAMPLE").ShouldBeTrue();

            scanner.IsAtEnd("// SAMPLE: States").ShouldBeFalse();
            scanner.IsAtEnd("Texas").ShouldBeFalse();
            scanner.IsAtEnd("ENDSAMPLE").ShouldBeFalse();
            scanner.IsAtEnd("// Something else").ShouldBeFalse();
        }
コード例 #2
0
        public void determine_name()
        {
            var scanner = new CLangSampleScanner("cs", "csharp");

            scanner.DetermineName("// SAMPLE: States").ShouldBe("States");
            scanner.DetermineName("     // SAMPLE: States").ShouldBe("States");
            scanner.DetermineName("    // SAMPLE: States").ShouldBe("States");
            scanner.DetermineName("Texas").ShouldBeNull();
            scanner.DetermineName("SAMPLE:").ShouldBeNull();
        }