dymokomi/luce-browser-engine
Source of release 0.6.1
0.6.1 / src / web / css / parser / tests_css_value_parsing_cases.lucb
#==============================================================================================
#
# tests_css_value_parsing_cases - the value parsing cases pinned to the reference build
#
# DESCRIPTION:
# Generated (a test vector table) from the output of a local oracle that runs the
# reference Ladybird build's CSS::Parser on the same inputs (luce-browser-tools,
# oracles/luce-browser-engine/css_value_parsing: cases.txt, oracle.cpp, gen_luce_cases.py).
# tests_css_value_parsing runs each case through the port and compares the dumps.
#
#==============================================================================================
## One oracle case: what to run, on what input, and the reference build's dump.
struct TestCssValueParsingCase:
let mode: str
let input: str
let expected: str
## Every oracle case, in cases.txt order.
let test_css_value_parsing_cases: TestCssValueParsingCase[447] = [
TestCssValueParsingCase(mode = "type:integer", input = "12", expected = " value: 12\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:integer", input = " -7 ", expected = " value: -7\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:integer", input = "1.5", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:integer", input = "+3", expected = " value: 3\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:integer", input = "2147483648", expected = " value: 2147483647\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:integer", input = "foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:integer", input = "", expected = " none\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:integer", input = "calc(1 + 2)", expected = " value: calc(3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "1.5", expected = " value: 1.5\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "-0.25e2", expected = " value: -25\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "12px", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:number", input = "3 4", expected = " value: 3\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:number", input = "calc(2 * 3)", expected = " value: calc(6)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "min(1, 2)", expected = " value: calc(1)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "sibling-count()", expected = " value: sibling-count()\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "sibling-index( )", expected = " value: sibling-index()\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:number", input = "sibling-index(1)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:percentage", input = "50%", expected = " value: 50%\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:percentage", input = "-12.5%", expected = " value: -12.5%\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:percentage", input = "50", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:percentage", input = "calc(10% + 5%)", expected = " value: calc(15%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:opacity-value", input = "0.5", expected = " value: 0.5\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:opacity-value", input = "50%", expected = " value: 0.5\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:opacity-value", input = "none", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:length", input = "10px", expected = " value: 10px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length", input = "1.5em", expected = " value: 1.5em\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length", input = "0", expected = " value: 0px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length", input = "-3rem", expected = " value: -3rem\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length", input = "5", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:length", input = "10deg", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:length", input = "10foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "svg+type:length", input = "12.3456", expected = " value: 12.34375px\n rest: 0\n"),
TestCssValueParsingCase(mode = "svg+type:length", input = "0", expected = " value: 0px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length", input = "calc(10px + 1em)", expected = " value: calc(1em + 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length", input = "anchor-size(width)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(width)", expected = " value: anchor-size(width)\n rest: 0\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(--foo height, 10px)", expected = " value: anchor-size(--foo height, 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(--foo)", expected = " value: anchor-size(--foo)\n rest: 0\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(10px)", expected = " value: anchor-size(10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(width, 10px)", expected = " value: anchor-size(width, 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(width 10px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(, 10px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(width width)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+type:length", input = "anchor-size(foo)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=color+type:length", input = "anchor-size(width)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:length-percentage", input = "10%", expected = " value: 10%\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length-percentage", input = "10px", expected = " value: 10px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length-percentage", input = "0", expected = " value: 0px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:length-percentage", input = "auto", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:angle", input = "45deg", expected = " value: 45deg\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:angle", input = "1.5turn", expected = " value: 1.5turn\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:angle", input = "-100grad", expected = " value: -100grad\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:angle", input = "2rad", expected = " value: 2rad\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:angle", input = "0", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "svg+type:angle", input = "45", expected = " value: 45deg\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:angle", input = "45px", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:angle-percentage", input = "10%", expected = " value: 10%\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:angle-percentage", input = "10deg", expected = " value: 10deg\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:flex", input = "1fr", expected = " value: 1fr\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:flex", input = "2.5fr", expected = " value: 2.5fr\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:flex", input = "1px", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:flex", input = "1", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:frequency", input = "10hz", expected = " value: 10Hz\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:frequency", input = "2kHz", expected = " value: 2kHz\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:frequency-percentage", input = "50%", expected = " value: 50%\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:resolution", input = "2dppx", expected = " value: 2dppx\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:resolution", input = "96dpi", expected = " value: 96dpi\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:resolution", input = "-1x", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:resolution", input = "1x", expected = " value: 1x\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:time", input = "1s", expected = " value: 1s\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:time", input = "250ms", expected = " value: 250ms\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:time", input = "1", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:time-percentage", input = "10%", expected = " value: 10%\n rest: 0\n"),
TestCssValueParsingCase(mode = "keyword", input = "auto", expected = " value: auto\n rest: 0\n"),
TestCssValueParsingCase(mode = "keyword", input = " BLOCK", expected = " value: block\n rest: 0\n"),
TestCssValueParsingCase(mode = "keyword", input = "notakeyword", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "keyword", input = "12", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "builtin", input = "inherit", expected = " value: inherit\n rest: 0\n"),
TestCssValueParsingCase(mode = "builtin", input = "INITIAL", expected = " value: initial\n rest: 0\n"),
TestCssValueParsingCase(mode = "builtin", input = "unset", expected = " value: unset\n rest: 0\n"),
TestCssValueParsingCase(mode = "builtin", input = "revert", expected = " value: revert\n rest: 0\n"),
TestCssValueParsingCase(mode = "builtin", input = "revert-layer", expected = " value: revert-layer\n rest: 0\n"),
TestCssValueParsingCase(mode = "builtin", input = "auto", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "customident", input = "foo", expected = " 'foo'\n rest: 0\n"),
TestCssValueParsingCase(mode = "customident", input = "none", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "customident", input = "inherit", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "customident", input = "default", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "customident", input = "12", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:custom-ident", input = "bar", expected = " value: bar\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:custom-ident", input = "initial", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "dashedident", input = "--foo", expected = " '--foo'\n rest: 0\n"),
TestCssValueParsingCase(mode = "dashedident", input = "-foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "dashedident", input = "foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:dashed-ident", input = " --x", expected = " value: --x\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:string", input = "\"hello\"", expected = " value: \"hello\"\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:string", input = "'a\"b'", expected = " value: \"a\\\"b\"\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:string", input = "hello", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:opentype-tag", input = "\"liga\"", expected = " value: \"liga\"\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:opentype-tag", input = "\"lig\"", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:opentype-tag", input = "\"ligat\"", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:opentype-tag", input = "\"l9 ga\"", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "family", input = "\"Times New Roman\"", expected = " value: \"Times New Roman\"\n rest: 0\n"),
TestCssValueParsingCase(mode = "family", input = "Times New Roman", expected = " value: Times\\ New\\ Roman\n rest: 0\n"),
TestCssValueParsingCase(mode = "family", input = " Arial ", expected = " value: Arial\n rest: 0\n"),
TestCssValueParsingCase(mode = "family", input = "serif", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "family", input = "sans-serif foo", expected = " value: sans-serif\\ foo\n rest: 0\n"),
TestCssValueParsingCase(mode = "family", input = "inherit", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "family", input = "default", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "family", input = "foo \"bar\"", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "family", input = "12", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:url", input = "url(foo.png)", expected = " value: url(\"foo.png\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:url", input = "url(\"foo.png\")", expected = " value: url(\"foo.png\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:url", input = "url( \"a b.png\" )", expected = " value: url(\"a b.png\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:url", input = "src(\"x\")", expected = " value: src(\"x\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:url", input = "url(foo.png) bar", expected = " value: url(\"foo.png\")\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:url", input = "foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" cross-origin(anonymous))", expected = " url: url(\"a.png\" cross-origin(anonymous)) / a.png\n rest: 0\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" referrer-policy(no-referrer) integrity(\"sha\") cross-origin(use-credentials))", expected = " url: url(\"a.png\" cross-origin(use-credentials) integrity(\"sha\") referrer-policy(no-referrer)) / a.png\n rest: 0\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" cross-origin(anonymous) cross-origin(anonymous))", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" cross-origin(bogus))", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" integrity(foo))", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" bogus(1))", expected = " none\n rest: 1\n error: Unable to parse <url> from `url(\"a.png\" bogus(1))`: Unrecognized URL modifier: bogus(1) (1)\n"),
TestCssValueParsingCase(mode = "url", input = "url(\"a.png\" cross-origin())", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "url", input = "url(a.png)", expected = " url: url(\"a.png\") / a.png\n rest: 0\n"),
TestCssValueParsingCase(mode = "url", input = "src(\"b.png\")", expected = " url: src(\"b.png\") / b.png\n rest: 0\n"),
TestCssValueParsingCase(mode = "url", input = "url()", expected = " url: url(\"\") / \n rest: 0\n"),
TestCssValueParsingCase(mode = "url", input = "url(12)", expected = " url: url(\"12\") / 12\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "red", expected = " value: red\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "ReD", expected = " value: red\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "transparent", expected = " value: transparent\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "currentcolor", expected = " value: currentcolor\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "canvastext", expected = " value: canvastext\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "#abc", expected = " value: rgb(170, 187, 204)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "#aabbcc", expected = " value: rgb(170, 187, 204)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "#aabbccdd", expected = " value: rgba(170, 187, 204, 0.867)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "#abcd", expected = " value: rgba(170, 187, 204, 0.867)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "#ab", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "#ggg", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "abc", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "notacolor", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1, 2, 3)", expected = " value: rgb(1, 2, 3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgba(1, 2, 3, 0.5)", expected = " value: rgba(1, 2, 3, 0.5)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(10%, 20%, 30%)", expected = " value: rgb(26, 51, 77)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(10%, 20, 30%)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1 2 3)", expected = " value: rgb(1, 2, 3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1 2 3 / 50%)", expected = " value: rgba(1, 2, 3, 0.5)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(none 2 3)", expected = " value: rgb(0, 2, 3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(none, 2, 3)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1, 2)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1 2 3 4)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1, 2, 3, 4, 5)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1 2 3 / none)", expected = " value: rgba(1, 2, 3, 0)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgba(255 0 0 / 0.25)", expected = " value: rgba(255, 0, 0, 0.25)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsl(120, 50%, 50%)", expected = " value: rgb(64, 191, 64)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsla(120deg, 50%, 50%, 0.3)", expected = " value: rgba(64, 191, 64, 0.3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsl(120 50% 50%)", expected = " value: rgb(64, 191, 64)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsl(120 50 50 / 10%)", expected = " value: rgba(64, 191, 64, 0.1)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsl(none 50% 50%)", expected = " value: rgb(191, 64, 64)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsl(120, 50, 50%)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "hsl(1turn, 10%, 20%)", expected = " value: rgb(56, 46, 46)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hwb(120 10% 20%)", expected = " value: rgb(26, 204, 26)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hwb(120 10% 20% / 0.5)", expected = " value: rgba(26, 204, 26, 0.5)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "hwb(120, 10%, 20%)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "lab(50% 20 30)", expected = " value: lab(50 20 30)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "lab(50 20 30 / 0.5)", expected = " value: lab(50 20 30 / 0.5)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "oklab(0.5 0.1 0.1)", expected = " value: oklab(0.5 0.1 0.1)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "lch(50% 30 120)", expected = " value: lch(50 30 120)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "lch(50% 30 120deg / 50%)", expected = " value: lch(50 30 120 / 0.5)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "oklch(0.5 0.1 30)", expected = " value: oklch(0.5 0.1 30)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "oklch(0.5 0.1)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "color(srgb 0.1 0.2 0.3)", expected = " value: color(srgb 0.1 0.2 0.3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color(display-p3 1 0 0 / 0.5)", expected = " value: color(display-p3 1 0 0 / 0.5)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color(XYZ-D65 0.1 0.2 0.3)", expected = " value: color(xyz-d65 0.1 0.2 0.3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color(foo 1 2 3)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "color(srgb 1 2)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "color-mix(in srgb, red, blue)", expected = " value: color-mix(in srgb, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color-mix(in oklch longer hue, red 20%, blue)", expected = " value: color-mix(in oklch longer hue, red 20%, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color-mix(red 0%, blue 0%)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "color-mix(red, blue)", expected = " value: color-mix(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color-mix(in hsl, red 30%, 40% blue)", expected = " value: color-mix(in hsl, red 30%, blue 40%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "color-mix(in foo, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "light-dark(red, blue)", expected = " value: light-dark(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:color", input = "light-dark(red)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "light-dark(red, blue, green)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(1 2 3) foo", expected = " value: rgb(1, 2, 3)\n rest: 2\n"),
TestCssValueParsingCase(mode = "cim", input = "in srgb", expected = " value: in srgb\n rest: 0\n"),
TestCssValueParsingCase(mode = "cim", input = "in xyz", expected = " value: in xyz-d65\n rest: 0\n"),
TestCssValueParsingCase(mode = "cim", input = "in hsl", expected = " value: in hsl\n rest: 0\n"),
TestCssValueParsingCase(mode = "cim", input = "in hsl longer hue", expected = " value: in hsl longer hue\n rest: 0\n"),
TestCssValueParsingCase(mode = "cim", input = "in hsl shorter", expected = " none\n rest: 5\n"),
TestCssValueParsingCase(mode = "cim", input = "in oklch increasing HUE", expected = " value: in oklch increasing hue\n rest: 0\n"),
TestCssValueParsingCase(mode = "cim", input = "in hsl foo hue", expected = " value: in hsl\n rest: 3\n"),
TestCssValueParsingCase(mode = "cim", input = "in foo", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "cim", input = "srgb", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "cim", input = "in --custom", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "type:image", input = "url(a.png)", expected = " value: url(\"a.png\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "url(#mask)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "image-set(\"a.png\" 1x, \"b.png\" 2x)", expected = " value: image-set(url(\"a.png\") 1x, url(\"b.png\") 2x)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "image-set(\"a.png\" 1x type(\"image/png\"))", expected = " value: image-set(url(\"a.png\") 1x type(\"image/png\"))\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "image-set(url(a.png) 2dppx)", expected = " value: image-set(url(\"a.png\") 2dppx)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "-webkit-image-set(\"a.png\")", expected = " value: image-set(url(\"a.png\") 1x)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "image-set()", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "image-set(\"a.png\" 1x 2x)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "image-set(\"a.png\" foo)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(red, blue)", expected = " value: linear-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(to right, red, blue)", expected = " value: linear-gradient(to right, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(to top left, red, blue)", expected = " value: linear-gradient(to left top, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(to left top, red, blue)", expected = " value: linear-gradient(to left top, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(to top bottom, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(45deg, red 10%, blue 90%)", expected = " value: linear-gradient(45deg, red 10%, blue 90%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(0, red, blue)", expected = " value: linear-gradient(0deg, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(in oklab, red, blue)", expected = " value: linear-gradient(in oklab, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(90deg in hsl longer hue, red, blue)", expected = " value: linear-gradient(90deg in hsl longer hue, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(red 10% 20%, blue)", expected = " value: linear-gradient(red 10% 20%, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(red, 30%, blue)", expected = " value: linear-gradient(red, 30%, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(red, 30%, 40%, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(red)", expected = " value: linear-gradient(red)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient(to, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "linear-gradient()", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "repeating-linear-gradient(red 0px, blue 10px)", expected = " value: repeating-linear-gradient(red 0px, blue 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "-webkit-linear-gradient(top, red, blue)", expected = " value: -webkit-linear-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "-webkit-linear-gradient(left top, red, blue)", expected = " value: -webkit-linear-gradient(left top, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "-webkit-repeating-linear-gradient(red, blue)", expected = " value: -webkit-repeating-linear-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "LINEAR-GRADIENT(red, blue)", expected = " value: linear-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(red, blue)", expected = " value: conic-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(from 45deg, red, blue)", expected = " value: conic-gradient(from 45deg, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(from 0, red, blue)", expected = " value: conic-gradient(from 0deg, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(at center, red, blue)", expected = " value: conic-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(from 10deg at left top, red, blue)", expected = " value: conic-gradient(from 10deg at left top, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(in hsl, red, blue)", expected = " value: conic-gradient(in hsl, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(red 0deg, blue 90deg, green 50%)", expected = " value: conic-gradient(red 0deg, blue 90deg, green 50%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(red 0, blue)", expected = " value: conic-gradient(red 0deg, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(at center from 10deg, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "conic-gradient(from, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "repeating-conic-gradient(red, blue 20deg)", expected = " value: repeating-conic-gradient(red, blue 20deg)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(red, blue)", expected = " value: radial-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(circle, red, blue)", expected = " value: radial-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(ellipse, red, blue)", expected = " value: radial-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(circle 10px, red, blue)", expected = " value: radial-gradient(10px, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(10px circle, red, blue)", expected = " value: radial-gradient(10px, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(10px, red, blue)", expected = " value: radial-gradient(10px, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(10px 20px, red, blue)", expected = " value: radial-gradient(10px 20px, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(ellipse 10px, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(circle 10px 20px, red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(closest-side, red, blue)", expected = " value: radial-gradient(closest-side, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(ellipse farthest-side at left, red, blue)", expected = " value: radial-gradient(farthest-side at left center, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(at 10px 20px, red, blue)", expected = " value: radial-gradient(at 10px 20px, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(in srgb, red, blue)", expected = " value: radial-gradient(red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(circle in hsl, red, blue)", expected = " value: radial-gradient(in hsl, red, blue)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "repeating-radial-gradient(red, blue 10px)", expected = " value: repeating-radial-gradient(red, blue 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:image", input = "radial-gradient(circle red, blue)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "foo(red)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:image", input = "none", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:position", input = "left", expected = " value: left center\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "center", expected = " value: center center\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "top", expected = " value: center top\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "10px", expected = " value: 10px center\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "left top", expected = " value: left top\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "top left", expected = " value: left top\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "center center", expected = " value: center center\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "10px 20%", expected = " value: 10px 20%\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "left 10px top 20px", expected = " value: left 10px top 20px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "top 10px left 20px", expected = " value: left 20px top 10px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "left top 10px", expected = " value: left top\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:position", input = "right 10px center", expected = " value: right 10px\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:position", input = "left left", expected = " value: left center\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:position", input = "10px top", expected = " value: 10px top\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:position", input = "top 10px", expected = " value: center top\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:background-position", input = "left 10px top", expected = " value: left 10px top\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:background-position", input = "center top 10px", expected = " value: center top 10px\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:background-position", input = "right 5px center", expected = " value: right 5px center\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:background-position", input = "center 10px top", expected = " value: center 10px\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:background-position", input = "left top", expected = " value: left top\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:paint", input = "red", expected = " value: red\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:paint", input = "none", expected = " value: none\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:paint", input = "context-fill", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:paint", input = "url(#grad)", expected = " value: url(\"#grad\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:paint", input = "url(#grad) red", expected = " value: url(\"#grad\") red\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:paint", input = "url(#grad) none", expected = " value: url(\"#grad\")\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:paint", input = "url(#grad) bogus", expected = " value: url(\"#grad\")\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:paint", input = "12", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(1px, 2px, 3px, 4px)", expected = " value: rect(1px, 2px, 3px, 4px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(1px 2px 3px 4px)", expected = " value: rect(1px, 2px, 3px, 4px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(auto, auto, 3px, auto)", expected = " value: rect(auto, auto, 3px, auto)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(1px, 2px 3px, 4px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(1px, 2px, 3px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(1px, 2px, 3px, 4px, 5px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:rect", input = "rect(1%, 2px, 3px, 4px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:ratio", input = "16 / 9", expected = " value: 16 / 9\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:ratio", input = "2", expected = " value: 2 / 1\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:ratio", input = "16/9", expected = " value: 16 / 9\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:ratio", input = "-1", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:ratio", input = "1 /", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "type:scroll-function", input = "scroll()", expected = " value: scroll()\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:scroll-function", input = "scroll(root)", expected = " value: scroll(root)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:scroll-function", input = "scroll(nearest block)", expected = " value: scroll()\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:scroll-function", input = "scroll(inline self)", expected = " value: scroll(self inline)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:scroll-function", input = "scroll(root root)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:scroll-function", input = "scroll(foo)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:view-function", input = "view()", expected = " value: view()\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-function", input = "view(inline)", expected = " value: view(inline)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-function", input = "view(10px)", expected = " value: view(10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-function", input = "view(auto auto)", expected = " value: view()\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-function", input = "view(10px 20% x)", expected = " value: view(x 10px 20%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-function", input = "view(block block)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:view-timeline-inset", input = "auto", expected = " value: auto\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-timeline-inset", input = "10px auto", expected = " value: 10px auto\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:view-timeline-inset", input = "10px 20px 30px", expected = " value: 10px 20px\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:fit-content", input = "fit-content", expected = " value: fit-content\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:fit-content", input = "fit-content(10px)", expected = " value: fit-content(10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:fit-content", input = "fit-content(10%)", expected = " value: fit-content(10%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:fit-content", input = "FIT-CONTENT(10px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:fit-content", input = "fit-content(10px 20px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(top)", expected = " value: anchor(top)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(--foo bottom)", expected = " value: anchor(--foo bottom)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(left --bar, 10px)", expected = " value: anchor(--bar left, 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(50%)", expected = " value: anchor(50%)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(10px)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(foo)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(--a --b top)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(top, anchor(bottom))", expected = " value: anchor(top, anchor(bottom))\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:anchor", input = "anchor(--x)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "radialsize", input = "closest-side", expected = " value: closest-side\n rest: 0\n"),
TestCssValueParsingCase(mode = "radialsize", input = "10px 20%", expected = " value: 10px 20%\n rest: 0\n"),
TestCssValueParsingCase(mode = "radialsize", input = "farthest-corner 10px", expected = " value: farthest-corner 10px\n rest: 0\n"),
TestCssValueParsingCase(mode = "radialsize", input = "-10px", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "radialsize", input = "foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "borderradius", input = "10px", expected = " value: 10px\n rest: 0\n"),
TestCssValueParsingCase(mode = "borderradius", input = "10px 20px", expected = " value: 10px 20px\n rest: 0\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px 2px 3px", expected = " value: 1px 2px 3px\n rest: 0\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px 2px 3px 4px", expected = " value: 1px 2px 3px 4px\n rest: 0\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px / 2px", expected = " value: 1px / 2px\n rest: 0\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px 2px / 3px 4px 5px", expected = " value: 1px 2px / 3px 4px 5px\n rest: 0\n"),
TestCssValueParsingCase(mode = "borderradius", input = "/ 2px", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px /", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px / 2px / 3px", expected = " none\n rest: 9\n"),
TestCssValueParsingCase(mode = "borderradius", input = "1px 2px 3px 4px 5px", expected = " none\n rest: 9\n"),
TestCssValueParsingCase(mode = "borderradius", input = "-1px", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "urange", input = "U+26", expected = " 38-38\n rest: 0\n"),
TestCssValueParsingCase(mode = "urange", input = "u+0-7F", expected = " 0-127\n rest: 0\n"),
TestCssValueParsingCase(mode = "urange", input = "U+0025-00FF", expected = " 37-255\n rest: 0\n"),
TestCssValueParsingCase(mode = "urange", input = "U+4??", expected = " 1024-1279\n rest: 0\n"),
TestCssValueParsingCase(mode = "urange", input = "u+1e1ee", expected = " 123374-123374\n rest: 0\n"),
TestCssValueParsingCase(mode = "urange", input = "u+1e-1f", expected = " 30-31\n rest: 0\n"),
TestCssValueParsingCase(mode = "urange", input = "U+ABCDEF0", expected = " none\n rest: 3\n error: Unable to parse <urange> from `+ABCDEF0`: Start value had 7 digits/?s, expected between 1 and 6. (1)\n"),
TestCssValueParsingCase(mode = "urange", input = "U+110000", expected = " none\n rest: 2\n error: Unable to parse <urange> from `+110000`: end_value (1114112) > maximum (1114111) (1)\n"),
TestCssValueParsingCase(mode = "urange", input = "U+20-10", expected = " none\n rest: 3\n error: Unable to parse <urange> from `+20-10`: start_value (32) > end_value (16) (1)\n"),
TestCssValueParsingCase(mode = "urange", input = "foo", expected = " none\n rest: 1\n error: Unable to parse <urange> from `foo`: Doesn't start with 'u'. (1)\n"),
TestCssValueParsingCase(mode = "urange", input = "U+?? ", expected = " 0-255\n rest: 1\n"),
TestCssValueParsingCase(mode = "urange", input = "u+0?-ff", expected = " none\n rest: 4\n error: Unable to parse <urange> from `u0?-ff`: Did not match grammar. (1)\n"),
TestCssValueParsingCase(mode = "urange", input = "u+1-", expected = " none\n rest: 3\n error: Unable to parse <urange> from `u1-`: Did not match grammar. (1)\n"),
TestCssValueParsingCase(mode = "urange", input = "u1", expected = " none\n rest: 1\n error: Unable to parse <urange> from `u1`: Doesn't start with 'u'. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+1F-2F", expected = " 31-47\n rest: 1\n"),
TestCssValueParsingCase(mode = "urangetext", input = "-1F", expected = " none\n rest: 1\n error: Unable to parse <urange> from `-1F`: Second character was '-', expected '+'. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+", expected = " none\n rest: 1\n error: Unable to parse <urange> from `+`: Start value had 0 digits/?s, expected between 1 and 6. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+12345678", expected = " none\n rest: 1\n error: Unable to parse <urange> from `+12345678`: Start value had 8 digits/?s, expected between 1 and 6. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+1??x", expected = " none\n rest: 4\n error: Unable to parse <urange> from `+1??x`: Has 1 trailing unused code points. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+1-x", expected = " none\n rest: 1\n error: Unable to parse <urange> from `+1-x`: End value had 0 digits, expected between 1 and 6. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+1-1234567", expected = " none\n rest: 2\n error: Unable to parse <urange> from `+1-1234567`: End value had 7 digits, expected between 1 and 6. (1)\n"),
TestCssValueParsingCase(mode = "urangetext", input = "+1-2x", expected = " none\n rest: 2\n error: Unable to parse <urange> from `+1-2x`: Has 1 trailing unused code points. (1)\n"),
TestCssValueParsingCase(mode = "uranges", input = "U+0-7F, U+100-17F", expected = " 2 ranges: 0-127 256-383 \n rest: 0\n"),
TestCssValueParsingCase(mode = "uranges", input = "U+0-7F, foo", expected = " 0 ranges: \n rest: 0\n error: Unable to parse <urange> from ` foo`: Doesn't start with 'u'. (1)\n"),
TestCssValueParsingCase(mode = "uranges", input = "", expected = " 0 ranges: \n rest: 0\n"),
TestCssValueParsingCase(mode = "urangevalue", input = "U+0-7F", expected = " value: U+0-7F\n rest: 0\n"),
TestCssValueParsingCase(mode = "declvalue", input = "foo bar", expected = " 3: [foo][ ][bar]\n rest: 0\n"),
TestCssValueParsingCase(mode = "declvalue", input = "a; b", expected = " 1: [a]\n rest: 3\n"),
TestCssValueParsingCase(mode = "declvalue", input = "a ! b", expected = " 2: [a][ ]\n rest: 3\n"),
TestCssValueParsingCase(mode = "declvalue", input = "(a; b) c", expected = " 3: [(a; b)][ ][c]\n rest: 0\n"),
TestCssValueParsingCase(mode = "declvalue", input = "[a ! b]", expected = " 1: [[a ! b]]\n rest: 0\n"),
TestCssValueParsingCase(mode = "declvalue", input = "f(x; y)", expected = " 1: [f(x; y)]\n rest: 0\n"),
TestCssValueParsingCase(mode = "declvalue", input = "a ) b", expected = " 2: [a][ ]\n rest: 3\n"),
TestCssValueParsingCase(mode = "declvalue", input = "", expected = " none\n rest: 0\n"),
TestCssValueParsingCase(mode = "declvalue:comma", input = "a, b", expected = " 1: [a]\n rest: 3\n"),
TestCssValueParsingCase(mode = "declvalue:comma", input = "(a, b), c", expected = " 1: [(a, b)]\n rest: 3\n"),
TestCssValueParsingCase(mode = "counterstylename", input = "decimal", expected = " 'decimal'\n rest: 0\n"),
TestCssValueParsingCase(mode = "counterstylename", input = "DECIMAL", expected = " 'decimal'\n rest: 0\n"),
TestCssValueParsingCase(mode = "counterstylename", input = "Disc", expected = " 'disc'\n rest: 0\n"),
TestCssValueParsingCase(mode = "counterstylename", input = "my-style", expected = " 'my-style'\n rest: 0\n"),
TestCssValueParsingCase(mode = "counterstylename", input = "none", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "linenames", input = "[a b]", expected = " names: '[a b]'\n rest: 0\n"),
TestCssValueParsingCase(mode = "linenames", input = "[]", expected = " names: '[]'\n rest: 0\n"),
TestCssValueParsingCase(mode = "linenames", input = "[span]", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "linenames", input = "[a 1]", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "linenames", input = "a", expected = " names: '[]'\n rest: 1\n"),
TestCssValueParsingCase(mode = "tracklist", input = "10px 1fr", expected = " list: '10px 1fr'\n rest: 0\n"),
TestCssValueParsingCase(mode = "tracklist", input = "[a] 10px [b c] auto [d]", expected = " list: '[a] 10px [b c] auto [d]'\n rest: 0\n"),
TestCssValueParsingCase(mode = "tracklist", input = "minmax(10px, 1fr) fit-content(20px)", expected = " list: 'minmax(10px, 1fr) fit-content(20px)'\n rest: 0\n"),
TestCssValueParsingCase(mode = "tracklist", input = "repeat(2, 10px [x] 20px)", expected = " list: 'repeat(2, 10px [x] 20px)'\n rest: 0\n"),
TestCssValueParsingCase(mode = "tracklist", input = "repeat(auto-fill, 10px)", expected = " list: 'none'\n rest: 1\n"),
TestCssValueParsingCase(mode = "tracklist", input = "min-content max-content auto", expected = " list: 'min-content max-content auto'\n rest: 0\n"),
TestCssValueParsingCase(mode = "tracklist", input = "-1px", expected = " list: 'none'\n rest: 1\n"),
TestCssValueParsingCase(mode = "tracklist", input = "minmax(1fr, 10px)", expected = " list: 'none'\n rest: 1\n"),
TestCssValueParsingCase(mode = "autotracklist", input = "10px repeat(auto-fill, 20px) 30px", expected = " list: '10px repeat(auto-fill, 20px) 30px'\n rest: 0\n"),
TestCssValueParsingCase(mode = "autotracklist", input = "repeat(auto-fit, minmax(10px, 1fr))", expected = " list: 'repeat(auto-fit, minmax(10px, 1fr))'\n rest: 0\n"),
TestCssValueParsingCase(mode = "autotracklist", input = "repeat(auto-fit, [a] 10px [b])", expected = " list: 'repeat(auto-fit, [a] 10px [b])'\n rest: 0\n"),
TestCssValueParsingCase(mode = "autotracklist", input = "10px repeat(2, 20px)", expected = " list: '10px repeat(2, 20px)'\n rest: 0\n"),
TestCssValueParsingCase(mode = "autotracklist", input = "repeat(auto-fill, 1fr)", expected = " list: 'none'\n rest: 1\n"),
TestCssValueParsingCase(mode = "explicittracklist", input = "10px [a] 20%", expected = " list: '10px [a] 20%'\n rest: 0\n"),
TestCssValueParsingCase(mode = "explicittracklist", input = "repeat(2, 10px)", expected = " list: 'none'\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:font-variant-east-asian", input = "jis78 full-width ruby", expected = " value: jis78 full-width ruby\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-variant-east-asian", input = "ruby ruby", expected = " none\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:font-variant-east-asian", input = "normal", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:font-variant-numeric", input = "ordinal slashed-zero lining-nums tabular-nums diagonal-fractions", expected = " value: lining-nums tabular-nums diagonal-fractions ordinal slashed-zero\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-variant-numeric", input = "oldstyle-nums lining-nums", expected = " none\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:font-variant-ligatures", input = "no-common-ligatures contextual", expected = " value: no-common-ligatures contextual\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-variant-ligatures", input = "historical-ligatures discretionary-ligatures no-historical-ligatures", expected = " none\n rest: 2\n"),
TestCssValueParsingCase(mode = "type:font-variant-alternates", input = "historical-forms stylistic(foo)", expected = " value: stylistic(foo) historical-forms\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-variant-alternates", input = "styleset(a, b) character-variant(c) swash(d) ornaments(e) annotation(f)", expected = " value: styleset(a, b) character-variant(c) swash(d) ornaments(e) annotation(f)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-variant-alternates", input = "stylistic(a, b)", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:font-variant-alternates", input = "historical-forms historical-forms", expected = " none\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-variant-alternates", input = "swash()", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:font-variant-alternates", input = "foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:corner-shape", input = "round", expected = " value: round\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:corner-shape", input = "SQUIRCLE", expected = " value: squircle\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:corner-shape", input = "foo", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:corner-shape", input = "auto", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "auto", expected = " value: \n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "--foo element-shared", expected = " value: --foo element-shared\n rest: 3\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "element-shared", expected = " value: element-shared\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "element-shared auto", expected = " value: element-shared\n rest: 3\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "--a --b", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "auto --a", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "fixed 0.5", expected = " value: fixed 0.5\n rest: 0\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "fixed 1", expected = " none\n rest: 3\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "fixed 0.5 x", expected = " none\n rest: 5\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "12", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "prop=width+random", input = "", expected = " none\n rest: 0\n"),
TestCssValueParsingCase(mode = "numberlist", input = "1, 2, 3", expected = " value: 1, 2, 3\n rest: 0\n"),
TestCssValueParsingCase(mode = "numberlist", input = "1 , 2", expected = " value: 1, 2\n rest: 0\n"),
TestCssValueParsingCase(mode = "numberlist", input = "1, x", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "numberlist", input = "1 2", expected = " none\n rest: 0\n"),
TestCssValueParsingCase(mode = "numberlist", input = "x", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:color", input = "rgb(calc(10 + 20) 2 3)", expected = " value: rgb(30, 2, 3)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:easing-function", input = "ease-in", expected = " none\n rest: 1\n"),
TestCssValueParsingCase(mode = "type:easing-function", input = "step-start", expected = " value: steps(1, start)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:easing-function", input = "cubic-bezier(0.1, 0.2, 0.3, 0.4)", expected = " value: cubic-bezier(0.1, 0.2, 0.3, 0.4)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:easing-function", input = "steps(3, jump-none)", expected = " value: steps(3, jump-none)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:easing-function", input = "linear(0, 0.5 50%, 1)", expected = " value: linear(0, 0.5 50%, 1)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:transform-function", input = "rotate(45deg)", expected = " value: rotate(45deg)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:transform-list", input = "translate(10px, 20%) scale(2)", expected = " value: translate(10px, 20%) scale(2)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:basic-shape", input = "circle(10px at center)", expected = " value: circle(10px at center center)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:basic-shape", input = "inset(10px round 5px)", expected = " value: inset(10px round 5px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:basic-shape", input = "polygon(evenodd, 0 0, 10px 10px)", expected = " value: polygon(evenodd, 0px 0px, 10px 10px)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:font-style", input = "oblique 10deg", expected = " value: oblique 10deg\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:counter", input = "counter(foo)", expected = " value: counter(foo)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:corner-shape", input = "superellipse(2)", expected = " value: superellipse(2)\n rest: 0\n"),
TestCssValueParsingCase(mode = "type:counter-style", input = "symbols(cyclic \"a\" \"b\")", expected = " value: symbols(cyclic \"a\" \"b\")\n rest: 0\n"),
]