From ab8f375ae4cc764bbba5ca634d5affe1843357e7 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 7 Oct 2026 02:18:45 +0200 Subject: [PATCH] Name path_test's two compiledPath tests for it --- path_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/path_test.go b/path_test.go index 5622dad..98ebe8e 100644 --- a/path_test.go +++ b/path_test.go @@ -7,7 +7,7 @@ import ( "testing" ) -func TestPathCheckStopsAtAMissingSegment(t *testing.T) { +func TestCompiledPathStopsAtAMissingSegment(t *testing.T) { n := compiled(t, `{"format":"{a}","a":{"format":"{b}","b":"leaf"}}`) if leaves := compilePath(n, []string{"a", "b"}).leaves; len(leaves) != 1 { t.Fatalf("compilePath(a.b).leaves = %v, want the one leaf", leaves) @@ -22,7 +22,7 @@ func TestPathCheckStopsAtAMissingSegment(t *testing.T) { } } -func TestPathCheckChoiceConsumesNoSegment(t *testing.T) { +func TestCompiledPathChoiceConsumesNoSegment(t *testing.T) { n := compiled(t, `[{"format":"{f}","f":"1"},{"format":"{f}","f":"2"}]`) if leaves := compilePath(n, []string{"f"}).leaves; len(leaves) != 2 { t.Fatalf("compilePath through a choice = %v, want both variants' f", leaves)