diff --git a/cue/scanner/fuzz.go b/cue/scanner/fuzz.go deleted file mode 100644 index 3ad29c54e19..00000000000 --- a/cue/scanner/fuzz.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 CUE Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build gofuzz - -package scanner - -import ( - "cuelang.org/go/cue/token" -) - -func Fuzz(b []byte) int { - retCode := 1 - eh := func(_ token.Pos, msg string, args []interface{}) { - retCode = 0 - } - - var s Scanner - s.Init(token.NewFile("", -1, len(b)), b, eh, ScanComments) - - for { - _, tok, _ := s.Scan() - if tok == token.EOF { - break - } - } - return retCode -} diff --git a/cue/scanner/testdata/corpus/+basic.cue b/cue/scanner/testdata/corpus/+basic.cue deleted file mode 100644 index fb0e42200b9..00000000000 --- a/cue/scanner/testdata/corpus/+basic.cue +++ /dev/null @@ -1,58 +0,0 @@ -/* a comment */ -/* -*/ -@foo() -@foo(,,) -@foo(a) -@foo(aa=b) -@foo(,a=b) -@foo(",a=b") -@foo(##"\(),a=b"##) -@foo("",a="") -_|_ -foobar -a۰۱۸ -foo६४ -bar9876 -ŝ -ŝfoo -0 -1 -123456789012345678890 -12345_67890_12345_6788_90 -1234567M -1234567Mi -1234567 -.3Mi -3.3Mi -0xcafebabe -0b1100_1001 -0o1234567 -0. -.0 -3.14159265 -1e0 -1e+100 -1e-100 -2.71828e-1000 -'a' -'\\000' -'\\xFF' -'\\uff16' -'\\uD801' -'\\U0000ff16' -'foobar' -'foo\/bar' -#" ""# -#"foobar"# -#"\r"# -#"\("# -#"\q"# -###"\##q"### -"foobar" -""" - foobar - """ -#""" - \(foobar - """# diff --git a/cue/scanner/testdata/corpus/+comments.cue b/cue/scanner/testdata/corpus/+comments.cue deleted file mode 100644 index e924b70d6d9..00000000000 --- a/cue/scanner/testdata/corpus/+comments.cue +++ /dev/null @@ -1,24 +0,0 @@ -foo //comment -foo //comment -foo /*comment*/ -foo /*\n*/ -foo /*comment*/ -foo /* -*/ - -foo // comment -foo /*comment*/ -foo /* -*/ -foo /* */ /* - */, bar /**/ -foo /*0*/ /*1*/ /*2*/ - -foo /*comment*/ -foo /*0*/ /*1*/ /*2*/ -foo /**/ /*-------------*/ /*---- -*/, bar /* -baa -foo /* an EOF terminates a line */ -foo /* an EOF terminates a line */ /* -foo /* an EOF terminates a line */ // diff --git a/cue/scanner/testdata/corpus/+package.cue b/cue/scanner/testdata/corpus/+package.cue deleted file mode 100644 index 06ab7d0f9a3..00000000000 --- a/cue/scanner/testdata/corpus/+package.cue +++ /dev/null @@ -1 +0,0 @@ -package main diff --git a/cue/scanner/testdata/corpus/+tokens.cue b/cue/scanner/testdata/corpus/+tokens.cue deleted file mode 100644 index 66191b0db17..00000000000 --- a/cue/scanner/testdata/corpus/+tokens.cue +++ /dev/null @@ -1,49 +0,0 @@ -\ufeff -, -foo -_foo -123 -1.2 -'x' -_|_ -"x" -#'x'# - """ - foo - "" -+-*/% -&| -&& -|| -<- --> -== -< -> -= -! -!= -<= ->= -:= -... -( -[ -[[ -{ -{{ -. -) -] -]] -} -}} -: -; -true -false -null -for -if -let -in \ No newline at end of file diff --git a/cue/scanner/testdata/cue.mod/module.cue b/cue/scanner/testdata/cue.mod/module.cue deleted file mode 100644 index ac98581306a..00000000000 --- a/cue/scanner/testdata/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -Ensure that CUE files in Go testdata dirs are not part of the CUE module.