Exemplo n.º 1
0
        public void TestToString()
        {
            const string input     = "try func  (func2 (123))";
            IATokenizer  tokenizer = ATokenizerFactory.CreateInstance();

            tokenizer.Tokenize(input);
            tokenizer.ToString().Should().Be("try func (func2 (123))", "because it should keep spaces (but truncate several contiguous spaces to one)");
        }
Exemplo n.º 2
0
        public void TestFunction_When_WrappedWithCurlyBraces()
        {
            const string input     = "try {fn func  ({ fn func2 (123) })}";
            IATokenizer  tokenizer = ATokenizerFactory.CreateInstance();

            tokenizer.Tokenize(input);
            tokenizer.ToString().Should().Be("try func (func2 (123) )", "because wrapping function is legal syntax");
        }