Cursor generated unit tests

This commit is contained in:
Mike Farah
2025-10-12 15:38:40 +11:00
parent ff2c1c930c
commit 7f72595a12
12 changed files with 1636 additions and 8 deletions
-3
View File
@@ -152,8 +152,6 @@ func TestCandidateNodeAddKeyValueChild(t *testing.T) {
key := CandidateNode{Value: "cool", IsMapKey: true}
node := CandidateNode{}
// if we use a key in a new node as a value, it should no longer be marked as a key
_, keyIsValueNow := node.AddKeyValueChild(&CandidateNode{Value: "newKey"}, &key)
test.AssertResult(t, keyIsValueNow.IsMapKey, false)
@@ -242,7 +240,6 @@ func TestCandidateNodeGetNicePath(t *testing.T) {
nicePath = arrayNode.GetNicePath()
test.AssertResult(t, "[0]", nicePath)
// Test key with dots (should not be bracketed when it's the first element)
dotKey := createStringScalarNode("key.with.dots")
dotNode := CandidateNode{Key: dotKey}
nicePath = dotNode.GetNicePath()