Skip to content

Commit e33b028

Browse files
committed
Added test for Extension instance fields
Also removed debug print from array concat test
1 parent 21c21e7 commit e33b028

6 files changed

Lines changed: 15 additions & 7 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MyClass.test = "test"
2+
MyClass.testP = "testP"
3+
function MyClass.myFunction(self)
4+
end
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/** !Extension */
22
class MyClass {
3-
myFunction() {}
4-
}
3+
public myFunction() {}
4+
}

test/translation/ts/classExtension2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ class TestClass {
44

55
/** !Extension */
66
class MyClass extends TestClass {
7-
myFunction() {}
7+
public myFunction() {}
88
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/** !Extension RenamedTestClass */
22
class TestClass {
3-
myFunction() {}
3+
public myFunction() {}
44
}
55

66
/** !Extension RenamedMyClass */
77
class MyClass extends TestClass {
8-
myFunction() {}
8+
public myFunction() {}
99
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** !Extension */
2+
class MyClass {
3+
public test: string = "test";
4+
private testP: string = "testP";
5+
public myFunction() {}
6+
}

test/unit/lualib/lualib.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ export class LuaLibArrayTests {
185185
@Test("array.concat")
186186
public concat<T>(arr: T[], ...args: T[]) {
187187
const argStr = args.map(arg => JSON.stringify(arg)).join(",");
188-
console.log(argStr);
189-
console.log("\n");
190188
// Transpile
191189
const lua = util.transpileString(
192190
`let concatTestTable = ${JSON.stringify(arr)};

0 commit comments

Comments
 (0)