moved a subset of source file to the kern package
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
|
||||
// All rights reserved.
|
||||
|
||||
// t_simple-store_test.go
|
||||
package expr
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetVar(t *testing.T) {
|
||||
ctx := NewSimpleStoreWithoutGlobalContext()
|
||||
ctx.SetVar("x", 10)
|
||||
if value, exists := ctx.GetVar("x"); !exists {
|
||||
t.Errorf("missing variable 'x'")
|
||||
} else if value != int64(10) {
|
||||
t.Errorf("expcted 10, got %v", value)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user