Skip to content

Commit

Permalink
Add tests of some An+B cases
Browse files Browse the repository at this point in the history
  • Loading branch information
danny0838 committed Apr 6, 2024
1 parent a9660fe commit 454675a
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6851,6 +6851,114 @@ return [
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "3n+1",
"expected": [
{
"type": "DIMENSION",
"value": 3,
"isInteger": true,
"unit": "n"
},
{
"type": "NUMBER",
"value": 1,
"isInteger": true,
"sign": "+"
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "+3n+1",
"expected": [
{
"type": "DIMENSION",
"value": 3,
"isInteger": true,
"unit": "n",
"sign": "+"
},
{
"type": "NUMBER",
"value": 1,
"isInteger": true,
"sign": "+"
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "-3n+1",
"expected": [
{
"type": "DIMENSION",
"value": -3,
"isInteger": true,
"unit": "n",
"sign": "-"
},
{
"type": "NUMBER",
"value": 1,
"isInteger": true,
"sign": "+"
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "n+2",
"expected": [
{
"type": "IDENT",
"value": "n"
},
{
"type": "NUMBER",
"value": 2,
"isInteger": true,
"sign": "+"
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "+n+2",
"expected": [
{
"type": "DELIM",
"value": "+"
},
{
"type": "IDENT",
"value": "n"
},
{
"type": "NUMBER",
"value": 2,
"isInteger": true,
"sign": "+"
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "-n+2",
"expected": [
{
"type": "IDENT",
"value": "-n"
},
{
"type": "NUMBER",
"value": 2,
"isInteger": true,
"sign": "+"
}
]
},
{
"parser": "parseAListOfComponentValues",
"css": "~=|=^=$=*=||<!------> |/**/| ~/**/=",
Expand Down

0 comments on commit 454675a

Please sign in to comment.