Skip to content

Commit 454675a

Browse files
committed
Add tests of some An+B cases
1 parent a9660fe commit 454675a

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

tests.js

+108
Original file line numberDiff line numberDiff line change
@@ -6851,6 +6851,114 @@ return [
68516851
}
68526852
]
68536853
},
6854+
{
6855+
"parser": "parseAListOfComponentValues",
6856+
"css": "3n+1",
6857+
"expected": [
6858+
{
6859+
"type": "DIMENSION",
6860+
"value": 3,
6861+
"isInteger": true,
6862+
"unit": "n"
6863+
},
6864+
{
6865+
"type": "NUMBER",
6866+
"value": 1,
6867+
"isInteger": true,
6868+
"sign": "+"
6869+
}
6870+
]
6871+
},
6872+
{
6873+
"parser": "parseAListOfComponentValues",
6874+
"css": "+3n+1",
6875+
"expected": [
6876+
{
6877+
"type": "DIMENSION",
6878+
"value": 3,
6879+
"isInteger": true,
6880+
"unit": "n",
6881+
"sign": "+"
6882+
},
6883+
{
6884+
"type": "NUMBER",
6885+
"value": 1,
6886+
"isInteger": true,
6887+
"sign": "+"
6888+
}
6889+
]
6890+
},
6891+
{
6892+
"parser": "parseAListOfComponentValues",
6893+
"css": "-3n+1",
6894+
"expected": [
6895+
{
6896+
"type": "DIMENSION",
6897+
"value": -3,
6898+
"isInteger": true,
6899+
"unit": "n",
6900+
"sign": "-"
6901+
},
6902+
{
6903+
"type": "NUMBER",
6904+
"value": 1,
6905+
"isInteger": true,
6906+
"sign": "+"
6907+
}
6908+
]
6909+
},
6910+
{
6911+
"parser": "parseAListOfComponentValues",
6912+
"css": "n+2",
6913+
"expected": [
6914+
{
6915+
"type": "IDENT",
6916+
"value": "n"
6917+
},
6918+
{
6919+
"type": "NUMBER",
6920+
"value": 2,
6921+
"isInteger": true,
6922+
"sign": "+"
6923+
}
6924+
]
6925+
},
6926+
{
6927+
"parser": "parseAListOfComponentValues",
6928+
"css": "+n+2",
6929+
"expected": [
6930+
{
6931+
"type": "DELIM",
6932+
"value": "+"
6933+
},
6934+
{
6935+
"type": "IDENT",
6936+
"value": "n"
6937+
},
6938+
{
6939+
"type": "NUMBER",
6940+
"value": 2,
6941+
"isInteger": true,
6942+
"sign": "+"
6943+
}
6944+
]
6945+
},
6946+
{
6947+
"parser": "parseAListOfComponentValues",
6948+
"css": "-n+2",
6949+
"expected": [
6950+
{
6951+
"type": "IDENT",
6952+
"value": "-n"
6953+
},
6954+
{
6955+
"type": "NUMBER",
6956+
"value": 2,
6957+
"isInteger": true,
6958+
"sign": "+"
6959+
}
6960+
]
6961+
},
68546962
{
68556963
"parser": "parseAListOfComponentValues",
68566964
"css": "~=|=^=$=*=||<!------> |/**/| ~/**/=",

0 commit comments

Comments
 (0)