Skip to content

Commit

Permalink
Check static methods on MyType
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Jun 3, 2023
1 parent e566b1e commit dc41725
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/Tests/src/Semantic/Meta_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ type My_Type
@b (self -> self.foo)
other_method self a = a

create foo bar = My_Type.Value foo bar 3

@self ("se" + "lf")
My_Type.my_method self = self.foo + self.bar + self.baz

My_Type.factory = My_Type.create 1 2

@a (test_method 3 4)
@b (Test_Type.Value 49)
@c (Error.throw "Error Value")
Expand Down Expand Up @@ -247,6 +251,10 @@ spec =

methods.sort . should_equal ['bar', 'baz', 'first_method', 'foo', 'my_method', 'other_method', 'second_method']

Test.specify "static methods of MyType" <|
methods = Meta.meta (Meta.type_of My_Type) . methods
methods.sort . should_equal ['Value', 'create', 'factory', 'first_method', 'my_method', 'other_method', 'second_method']

Test.specify "methods of Integer" <|
Meta.meta Integer . methods . sort . should_equal ['round', 'truncate']

Expand Down

0 comments on commit dc41725

Please sign in to comment.