Skip to content

Commit

Permalink
Modified tests for cast and inheritance attribs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanay-man committed Aug 16, 2024
1 parent 0b3bec4 commit bb88bf5
Show file tree
Hide file tree
Showing 5 changed files with 419 additions and 3 deletions.
2 changes: 2 additions & 0 deletions integration_tests/class_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ def __init__(self:"Animal"):

class Dog(Animal):
def __init__(self:"Dog", name:str, age:i32):
# TODO: Enable super()
# super().__init__()
self.species: str = "Dog"
self.name: str = name
self.age: i32 = age

class Cat(Animal):
def __init__(self:"Cat", name: str, age: i32):
# TODO: Enable super()
# super().__init__()
self.species: str = "Cat"
self.name:str = name
Expand Down
3 changes: 0 additions & 3 deletions integration_tests/class_06.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ def __init__(self:"Base"):
self.x : i32 = 10

class Derived(Base):
# def __init__(self: "Derived"):
# super().__init__()
# self.y : i32 = 20
pass

def f(i:Base):
Expand Down
13 changes: 13 additions & 0 deletions tests/reference/asr-class_06-cdc5e29.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"basename": "asr-class_06-cdc5e29",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/../integration_tests/class_06.py",
"infile_hash": "f6ac8d14e8dcd9e828294fdc9fa65f930eb30e65094f342cd296cfb2",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-class_06-cdc5e29.stdout",
"stdout_hash": "26981374520cb1e14bfbc5b2fb349c66200d649a9f35bb110fc64287",
"stderr": null,
"stderr_hash": null,
"returncode": 0
}
Loading

0 comments on commit bb88bf5

Please sign in to comment.