Skip to content

Commit ccd34f5

Browse files
committed
remove: overload_mappings tests from ClassDef IR tests
Removed tests for overload_mappings field which was removed as part of the overload deprecation. ClassDef no longer supports operator overloading. - Deleted t/ir/classdef-overload.t entirely (overload-specific) - Removed overload_mappings subtests from t/ir/classdef-node.t Fixes test errors: 'Unrecognised parameters for ClassDef constructor: overload_mappings'
1 parent 36a52a7 commit ccd34f5

File tree

2 files changed

+0
-71
lines changed

2 files changed

+0
-71
lines changed

t/ir/classdef-node.t

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -133,34 +133,4 @@ subtest 'ClassDef to_hash' => sub {
133133
is($hash->{attributes}{field_count}, 1, 'attributes has field_count');
134134
};
135135

136-
subtest 'ClassDef with overload_mappings' => sub {
137-
require Chalk::IR::Node::ClassDef;
138-
139-
my $overload_map = {
140-
'""' => 'value',
141-
'eq' => '_string_eq',
142-
'cmp' => '_string_cmp',
143-
};
144-
145-
my $classdef = Chalk::IR::Node::ClassDef->new(
146-
class_name => 'Token',
147-
overload_mappings => $overload_map,
148-
);
149-
150-
ok(defined($classdef), 'ClassDef with overload_mappings is defined');
151-
is(ref($classdef->overload_mappings), 'HASH', 'overload_mappings returns hash');
152-
is_deeply($classdef->overload_mappings, $overload_map, 'overload_mappings accessor works');
153-
};
154-
155-
subtest 'ClassDef overload_mappings defaults to empty hash' => sub {
156-
require Chalk::IR::Node::ClassDef;
157-
158-
my $classdef = Chalk::IR::Node::ClassDef->new(
159-
class_name => 'Simple',
160-
);
161-
162-
is(ref($classdef->overload_mappings), 'HASH', 'overload_mappings defaults to hash');
163-
is(scalar(keys %{$classdef->overload_mappings}), 0, 'default overload_mappings is empty');
164-
};
165-
166136
done_testing();

t/ir/classdef-overload.t

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)