MCPcopy
hub / github.com/google/mangle / TestParseTermNegative

Function TestParseTermNegative

parse/parse_test.go:912–993  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

910}
911
912func TestParseTermNegative(t *testing.T) {
913 tests := []struct {
914 name string
915 str string
916 }{
917 {
918 name: "empty",
919 str: "",
920 },
921 {
922 name: "bad constant",
923 str: "/",
924 },
925 {
926 name: "bad constant 2",
927 str: "/bar/",
928 },
929 {
930 name: "bad constant 3",
931 str: "//",
932 },
933 {
934 name: "bad constant unterminated",
935 str: "/\"",
936 },
937 {
938 name: "bad constant string part",
939 str: "/prefix/\"string\"",
940 },
941 {
942 name: "negated constant?!",
943 str: "!/bar",
944 },
945 {
946 name: "negated variable?!",
947 str: "!X",
948 },
949 {
950 name: "not variable, not atom",
951 str: "x",
952 },
953 {
954 name: "when does it end?",
955 str: "foo(/bar",
956 },
957 {
958 name: "number too big",
959 str: "287326487236487264378264",
960 },
961 {
962 name: "bad float ",
963 str: ".e",
964 },
965 {
966 name: "number part",
967 str: "/catch/[22]",
968 },
969 {

Callers

nothing calls this directly

Calls 1

TermFunction · 0.70

Tested by

no test coverage detected