A lot of changes. Main ones are:
- fraction type renamed as FractionType and moved from operator-fraction.go to fraction-type.go - ListType moved from operator-list.go to list-type.go - all test file were renamed adding the "t_" prefix - defined a test template in file t_temple_test.go - new test file t_relational_test.go where relational tests are collected - lists can now compared as set using operators <, <=, >, and >= (IMPORTANT: here = menas same content, not same list)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
|
||||
// All rights reserved.
|
||||
|
||||
// t_strings_test.go
|
||||
package expr
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestStringsParser(t *testing.T) {
|
||||
inputs := []inputType{
|
||||
/* 1 */ {`"uno" + "due"`, `unodue`, nil},
|
||||
/* 2 */ {`"uno" + 2`, `uno2`, nil},
|
||||
/* 3 */ {`"uno" + (2+1)`, `uno3`, nil},
|
||||
/* 4 */ {`"uno" * (2+1)`, `unounouno`, nil},
|
||||
/* 5 */ {`"abc"[1]`, `b`, nil},
|
||||
/* 6 */ {`#"abc"`, int64(3), nil},
|
||||
}
|
||||
parserTest(t, "String", inputs)
|
||||
}
|
||||
Reference in New Issue
Block a user