Skip to content

Commit

Permalink
cue: remove testdata/gen.go
Browse files Browse the repository at this point in the history
It was introduced by https://cue-review.googlesource.com/c/cue/+/5821
back in 2020 when Marcel transitioned from table-driven tests in Go
test files to one txtar file per test inside testdata.

That transition finished a long time ago, and we have been expanding
the testdata txtar files manually to add test cases since.
For example, https://cuelang.org/cl/1172010 expanded the CUE input
to one of these generated txtar files, and we don't want to lose those
by re-generating the files.

Moreover, since `go generate ./...` skips over testdata directories
and this gen.go program had its own //go:generate directive,
we hadn't run this code generator for at least two or three years.
Case in point, it doesn't even work at this point.

As agreed with Marcel, it's well past the time to remove this generator.
Remove the "DO NOT EDIT" warnings too, as they no longer apply:

    sed -i '/DO NOT EDIT; generated by go run testdata/,+1d' cue/testdata/*/*.txtar

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I6673629e57da7608029c2c4a6caef24b259be926
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201347
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
  • Loading branch information
mvdan committed Sep 17, 2024
1 parent 99160fd commit 93c1124
Show file tree
Hide file tree
Showing 161 changed files with 0 additions and 645 deletions.
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/000_errors.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: errors
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/001_regexp.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: regexp
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/002_arithmetic.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: arithmetic
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: integer-specific arithmetic
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/004_booleans.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: booleans
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/005_boolean_arithmetic.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: boolean arithmetic
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/006_basic_type.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: basic type
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/007_strings_and_bytes.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: strings and bytes
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/008_escaping.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: escaping
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/009_reference.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: reference
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/010_lists.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: lists
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/012_selecting.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: selecting
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/013_obj_unify.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: obj unify
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/014_disjunctions.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go

#name: disjunctions
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/015_types.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: types
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/016_comparison.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: comparison
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/017_null.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: null
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/basicrewrite/018_self-reference_cycles.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: self-reference cycles
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: resolved self-reference cycles
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: resolved self-reference cycles: Issue 19
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/builtins/056_issue314.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: issue314
#evalFull
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/choosedefault/000_pick_first.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: pick first
#bug: true
#evalFull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: simple disambiguation conflict
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: associativity of defaults
#evalFull
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/comprehensions/015_list_comprehension.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: list comprehension
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: comprehension and skipped field
#bug: true
#evalFull
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/cycle/015_reference_across_tuples_and_back.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: reference across tuples and back
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/cycle/021_delayed_constraint_failure.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: delayed constraint failure
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/cycle/023_reentrance.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: reentrance
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: cannot resolve references that would be ambiguous
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: self-reference cycles conflicts with strings
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: resolved self-reference cycles with disjunctions
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: resolved self-reference cycles with disjunction with defaults
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/definitions/026_combined_definitions.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: combined definitions
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: recursive closing starting at non-definition
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/definitions/032_definitions_with_embedding.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: definitions with embedding
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/definitions/033_Issue_#153.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: Issue #153
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: closing with failed optional
#evalPartial
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/definitions/036_optionals_in_open_structs.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: optionals in open structs
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: closing with comprehensions
#evalPartial
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: conjunction of optional sets
#evalFull
-- in.cue --
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: continue recursive closing for optionals
#evalFull
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/definitions/039_augment_closed_optionals.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: augment closed optionals
#evalFull
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/disjunctions/019_ips.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: ips
#evalFull
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/000.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
"hello"
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/001.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
'hello'
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/002.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
'hello\nworld'
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/003.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
"hello\nworld"
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/004.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
{
$type: 3
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/005.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
{a: 1, b: a + 2, c: null, d: true, e: _, f: string}
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/006.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
{a: {b: 2.0, s: "abc"}, b: a.b, c: a.c, d: a["d"], e: a.t[2:3]}
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/008.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
{a: [ 3 & 4]}
-- out/def --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/009.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
import "list"

Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/010.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
import "list"
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/011.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{a: {b: []}, c: a.b, d: a["b"]}
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/012.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{a: *"foo" | *"bar" | *string | int, b: a[2:3]}
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/013.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
-- in.cue --
{
a: >=0 & <=10 & !=1
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/014.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/015.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
eval: true
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/016.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
eval: true
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/017.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{a: [1, 2], b: {for k, v in a if v > 1 {"\(k)": v}}}
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/018.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{a: [1, 2], b: [for k, v in a {v}]}
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/019.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{a: >=0 & <=10, b: "Count: \(a) times"}
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/020.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
-- in.cue --
{a: "", b: len(a)}
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/021.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
eval: true
-- in.cue --
Expand Down
2 changes: 0 additions & 2 deletions cue/testdata/export/022.txtar
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# DO NOT EDIT; generated by go run testdata/gen.go
#
raw: true
eval: true
noOpt: true
Expand Down
Loading

0 comments on commit 93c1124

Please sign in to comment.