Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Jan 6, 2025
1 parent 73e4017 commit 11626af
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/files/BrsFile.Class.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,42 @@ describe('BrsFile BrighterScript classes', () => {
`, undefined, 'source/main.bs');
});

it.only('test;lkajdsf;lkasjdf;lksajdf', () => {

Check failure on line 473 in src/files/BrsFile.Class.spec.ts

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest)

it.only not permitted
testTranspile(`
class Bird
sub new(p1)
end sub
end class
class Duck extends Bird
end class
`, `
function __Bird_builder()
instance = {}
instance.new = sub(p1)
end sub
return instance
end function
function Bird(p1)
instance = __Bird_builder()
instance.new(p1)
return instance
end function
function __Duck_builder()
instance = __Bird_builder()
instance.super0_new = instance.new
instance.new = sub()
m.super0_new()
end sub
return instance
end function
function Duck(p1)
instance = __Duck_builder()
instance.new(p1)
return instance
end function
`);
});

it('registers the constructor and properly handles its parameters', () => {
testTranspile(`
class Duck
Expand Down

0 comments on commit 11626af

Please sign in to comment.