tests: update with multi-parameter generics

This commit is contained in:
2026-06-29 22:43:08 +02:00
parent 89f3c945e4
commit dc2134c87d
5 changed files with 85 additions and 71 deletions

View File

@@ -24,7 +24,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Meter", "base": "Meter",
"param": null "args": []
}, },
"expr": { "expr": {
"_type": "LiteralExpr", "_type": "LiteralExpr",
@@ -62,7 +62,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Second", "base": "Second",
"param": null "args": []
}, },
"expr": { "expr": {
"_type": "LiteralExpr", "_type": "LiteralExpr",

View File

@@ -317,7 +317,7 @@
"pos": 0, "pos": 0,
"name": "object", "name": "object",
"type": {}, "type": {},
"required": true "required": false
} }
], ],
"args": [], "args": [],

View File

@@ -16,7 +16,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "bool", "base": "bool",
"param": null "args": []
} }
}, },
{ {
@@ -25,7 +25,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "int", "base": "int",
"param": null "args": []
} }
}, },
{ {
@@ -36,7 +36,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "float", "base": "float",
"param": null "args": []
}, },
"constraint": "(_ > 0) + (_ < 250)" "constraint": "(_ > 0) + (_ < 250)"
} }
@@ -47,7 +47,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "str", "base": "str",
"param": null "args": []
} }
}, },
{ {
@@ -56,7 +56,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "datetime", "base": "datetime",
"param": null "args": []
} }
}, },
{ {
@@ -65,7 +65,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "float", "base": "float",
"param": null "args": []
} }
}, },
{ {
@@ -79,7 +79,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "_", "base": "_",
"param": null "args": []
} }
} }
] ]

View File

@@ -16,7 +16,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "GeoLocation", "base": "GeoLocation",
"param": null "args": []
} }
} }
] ]
@@ -28,11 +28,13 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Column", "base": "Column",
"param": { "args": [
"_type": "BaseType", {
"base": "GeoLocation", "_type": "BaseType",
"param": null "base": "GeoLocation",
} "args": []
}
]
} }
}, },
{ {
@@ -65,11 +67,13 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Column", "base": "Column",
"param": { "args": [
"_type": "BaseType", {
"base": "GeoLocation", "_type": "BaseType",
"param": null "base": "GeoLocation",
} "args": []
}
]
} }
}, },
{ {
@@ -117,7 +121,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Latitude", "base": "Latitude",
"param": null "args": []
} }
}, },
{ {
@@ -146,7 +150,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Latitude", "base": "Latitude",
"param": null "args": []
} }
}, },
{ {
@@ -175,11 +179,13 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Difference", "base": "Difference",
"param": { "args": [
"_type": "BaseType", {
"base": "Latitude", "_type": "BaseType",
"param": null "base": "Latitude",
} "args": []
}
]
} }
}, },
{ {
@@ -217,7 +223,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "int", "base": "int",
"param": null "args": []
}, },
"constraint": "_ >= 0" "constraint": "_ >= 0"
} }
@@ -230,7 +236,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "float", "base": "float",
"param": null "args": []
}, },
"constraint": "_ >= 0" "constraint": "_ >= 0"
} }
@@ -252,7 +258,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "int", "base": "int",
"param": null "args": []
}, },
"constraint": "Positive" "constraint": "Positive"
} }
@@ -265,7 +271,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "float", "base": "float",
"param": null "args": []
}, },
"constraint": "Positive" "constraint": "Positive"
} }

View File

@@ -14,15 +14,17 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Column", "base": "Column",
"param": { "args": [
"_type": "ConstraintType", {
"type": { "_type": "ConstraintType",
"_type": "BaseType", "type": {
"base": "float", "_type": "BaseType",
"param": null "base": "float",
}, "args": []
"constraint": "0 <= _ <= 1" },
} "constraint": "0 <= _ <= 1"
}
]
}, },
"default": null "default": null
}, },
@@ -31,15 +33,17 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Column", "base": "Column",
"param": { "args": [
"_type": "ConstraintType", {
"type": { "_type": "ConstraintType",
"_type": "BaseType", "type": {
"base": "float", "_type": "BaseType",
"param": null "base": "float",
}, "args": []
"constraint": "0 <= _ <= 1" },
} "constraint": "0 <= _ <= 1"
}
]
}, },
"default": null "default": null
} }
@@ -50,15 +54,17 @@
"returns": { "returns": {
"_type": "BaseType", "_type": "BaseType",
"base": "Column", "base": "Column",
"param": { "args": [
"_type": "ConstraintType", {
"type": { "_type": "ConstraintType",
"_type": "BaseType", "type": {
"base": "float", "_type": "BaseType",
"param": null "base": "float",
}, "args": []
"constraint": "0 <= _ <= 2" },
} "constraint": "0 <= _ <= 2"
}
]
}, },
"body": [ "body": [
{ {
@@ -67,15 +73,17 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "Column", "base": "Column",
"param": { "args": [
"_type": "ConstraintType", {
"type": { "_type": "ConstraintType",
"_type": "BaseType", "type": {
"base": "float", "_type": "BaseType",
"param": null "base": "float",
}, "args": []
"constraint": "0 <= _ <= 2" },
} "constraint": "0 <= _ <= 2"
}
]
} }
}, },
{ {
@@ -117,7 +125,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "int", "base": "int",
"param": null "args": []
}, },
"default": null "default": null
} }
@@ -128,7 +136,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "float", "base": "float",
"param": null "args": []
}, },
"default": null "default": null
} }
@@ -140,7 +148,7 @@
"type": { "type": {
"_type": "BaseType", "_type": "BaseType",
"base": "str", "base": "str",
"param": null "args": []
}, },
"default": null "default": null
} }