Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
BalaM314 committed May 18, 2024
1 parent eb6b54c commit 3b353e0
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion spec/src/full.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,39 @@ CLASS Dog INHERITS Animal
ENDFUNCTION
ENDCLASS
DECLARE animal: Animal
animal <- NEW Animal("animal")
DECLARE dog: Dog
dog <- NEW Dog("doggy")
DECLARE dogAnimal: Animal
dogAnimal <- NEW Dog("doggy2")
PROCEDURE test(arg:Animal)
OUTPUT arg.isSus()
ENDPROCEDURE
CALL test(animal)
CALL test(dog)
CALL test(dogAnimal)`,
["TRUE", "FALSE", "FALSE"]
],
call_class_method_in_function_polymorphically_and_mutate_byref: [
`CLASS Animal
PUBLIC Name: STRING
PUBLIC PROCEDURE NEW(name: STRING)
Name <- name
ENDPROCEDURE
PUBLIC FUNCTION isSus() RETURNS BOOLEAN
RETURN TRUE
ENDFUNCTION
ENDCLASS
CLASS Dog INHERITS Animal
PUBLIC PROCEDURE NEW(name: STRING)
CALL SUPER.NEW(name)
ENDPROCEDURE
PUBLIC FUNCTION isSus() RETURNS BOOLEAN
RETURN FALSE
ENDFUNCTION
ENDCLASS
DECLARE animal: Animal
animal <- NEW Animal("animal")
DECLARE dog: Dog
Expand All @@ -856,7 +889,7 @@ ENDPROCEDURE
CALL test(animal)
CALL test(dog)
CALL test(dogAnimal)`,
["TRUE", "FALSE", "FALSE"]
`Cannot coerce BYREF`
],
call_class_method_in_function_polymorphically_and_mutate_byval: [
`CLASS Animal
Expand Down

0 comments on commit 3b353e0

Please sign in to comment.