Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TestLex (0.1 sec)

  1. src/cmd/asm/internal/lex/lex_test.go

    	/* This one fails. See comment in Slice.Col.
    	{
    		"nested #define with args",
    		lines(
    			"#define A #define B (x) x",
    			"A",
    			"B(THIS)",
    		),
    		"x.\n",
    	},
    	*/
    }
    
    func TestLex(t *testing.T) {
    	for _, test := range lexTests {
    		input := NewInput(test.name)
    		input.Push(NewTokenizer(test.name, strings.NewReader(test.input), nil))
    		result := drain(input)
    		if result != test.output {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 07:48:38 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  2. src/go/build/constraint/expr_test.go

    	{"&&||!()xy yx ", "&& || ! ( ) xy yx"},
    	{"x~", "x err: invalid syntax at ~"},
    	{"x ~", "x err: invalid syntax at ~"},
    	{"x &", "x err: invalid syntax at &"},
    	{"x &y", "x err: invalid syntax at &"},
    }
    
    func TestLex(t *testing.T) {
    	for i, tt := range lexTests {
    		t.Run(fmt.Sprint(i), func(t *testing.T) {
    			p := &exprParser{s: tt.in}
    			out := ""
    			for {
    				tok, err := lexHelp(p)
    				if tok == "" && err == nil {
    					break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 18 22:36:55 UTC 2021
    - 7.6K bytes
    - Viewed (0)
  3. src/text/template/parse/lex_test.go

    			return false
    		}
    		if checkPos && i1[k].pos != i2[k].pos {
    			return false
    		}
    		if checkPos && i1[k].line != i2[k].line {
    			return false
    		}
    	}
    	return true
    }
    
    func TestLex(t *testing.T) {
    	for _, test := range lexTests {
    		items := collect(&test, "", "")
    		if !equal(items, test.items, false) {
    			t.Errorf("%s: got\n\t%+v\nexpected\n\t%v", test.name, items, test.items)
    			return // TODO
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 23 15:03:43 UTC 2022
    - 13.9K bytes
    - Viewed (0)
Back to top