iter 23.2.3-prep: reconcile workspace tests with auto-loaded prelude class Eq
The auto-loaded prelude (iter 23.2 work-in-progress) injects `class Eq` plus three primitive instances (Eq Int, Eq Bool, Eq Str) into every workspace. Five workspace::tests assertions broke against this new baseline: - iter22b1_missing_method_fires_diagnostic - instance_without_superclass_instance_fires - instance_overriding_nonexistent_method_fires Their fixtures redeclare `class Eq` (and `class Ord` in one case), which now collides with the prelude. Renamed each fixture's `Eq`/`eq` -> `TEq`/`teq` and `Ord`/`lt` -> `TOrd`/`tlt`, matching the scheme already used in the two earlier-renamed test_22b2 fixtures. Method `ne` stays (does not collide). Assertion strings in workspace.rs updated to match. - iter22b1_workspace_with_no_classes_has_empty_registry - iter22b1_instance_in_class_module_loads_clean Their asserted registry counts assumed an otherwise-empty registry. Rewritten to filter by `defining_module != "prelude"`: the property is "no NON-prelude entries" / "exactly one fixture-owned entry", not raw count. Doc comments updated alongside each assertion change so the rationale for TEq/TOrd (collision avoidance) is local. No production code touched.
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
"defs": [
|
||||
{
|
||||
"kind": "class",
|
||||
"name": "Eq",
|
||||
"name": "TEq",
|
||||
"param": "a",
|
||||
"methods": [
|
||||
{
|
||||
"name": "eq",
|
||||
"name": "teq",
|
||||
"type": {
|
||||
"k": "fn",
|
||||
"params": [
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
{
|
||||
"kind": "instance",
|
||||
"class": "Eq",
|
||||
"class": "TEq",
|
||||
"type": { "k": "con", "name": "Int" },
|
||||
"methods": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user