Skip to content

Commit 839eb2b

Browse files
authored
Merge branch 'release' into bektchiev/fix-mdg-tests
2 parents f9ef40f + 057ad9a commit 839eb2b

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

tests/TestRunner/app/Inheritance/InheritanceTests.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ describe(module.id, function () {
197197

198198
if(!isSimulator) {
199199
it("Throwing constructor", function () {
200-
expect(() => TNSBaseInterface.alloc().initThrowingException()).toThrowError("Custom Reason");
200+
for (var i = 0; i < 20; i++) {
201+
expect(() => TNSBaseInterface.alloc().initThrowingException()).toThrowError("Custom Reason");
202+
}
201203
});
202204
}
203205

@@ -663,12 +665,12 @@ describe(module.id, function () {
663665
get isEqual() {
664666
}
665667
})).toThrowError(/Cannot override native method "isEqual" with a property, define it as a JS function instead. \(evaluating 'NSObject.extend\({[^$]*}\)'\)/m);
666-
668+
667669
expect(() => NSObject.extend({
668670
isEqual: true
669671
})).toThrowError(/true cannot override native method "isEqual". \(evaluating 'NSObject.extend\({[^$]*}\)'\)/m);
670672
});
671-
673+
672674
it('ConstructorOverrides: prototype', function () {
673675
var JSDerivedInterface = TNSDerivedInterface.extend({
674676
initBaseProtocolMethod1: function () {
@@ -1645,10 +1647,10 @@ describe(module.id, function () {
16451647
})).toThrowError('Property "derivedImplementedOptionalProperty" requires a setter function.');
16461648
expect(() => TNSIDerivedInterface.extend({
16471649
derivedImplementedOptionalProperty: function() {
1648-
}
1650+
}
16491651
})).toThrowError(/function cannot override native property "derivedImplementedOptionalProperty", define it as a JS property instead. \(evaluating 'TNSIDerivedInterface.extend\({[^$]*}\)'\)/m);
16501652
});
1651-
1653+
16521654
it('ConstructorOverrideAndVirtualCall: prototype', function () {
16531655
var JSObject = TNSIConstructorVirtualCalls.extend({
16541656
initWithXAndY: function initWithXAndY(x, y) {
@@ -2110,7 +2112,7 @@ describe(module.id, function () {
21102112
describe("instanceof", function () {
21112113
it("TNSIBaseProtocolImpl_Private returned as TNSIBaseInterface*", function () {
21122114
var inst = TNSPrivateInterfaceResults.instanceFromUnrelatedPrivateType();
2113-
2115+
21142116
// Actual class is unrelated and doesn't inherit TNSIBaseInterface, but in order to be
21152117
// able to call methods from the puclicly declared type we are creating a constructor
21162118
// that inheriting from this public interface.
@@ -2129,14 +2131,14 @@ describe(module.id, function () {
21292131

21302132
it("TNSIBaseInterface_Private returned as id<TNSIBaseProtocol, TNSIDerivedProtocol>", function () {
21312133
var inst = TNSPrivateInterfaceResults.instanceFromPrivateTypeImplementingTwoProtocols();
2132-
2134+
21332135
expect(inst instanceof TNSIBaseInterface).toBe(true, "Actual class inherits from TNSIBaseInterface");
21342136
expect(inst.constructor.__constructorDescription).toMatch(/TNSIBaseInterface.*Unknown.*TNSIBaseInterface_Private.*protocols.*TNSIDerivedProtocol/);
21352137
expect(inst.constructor.__constructorDescription).not.toMatch(/TNSIBaseProtocol/, "TNSIBaseProtocol must have been stripped");
21362138
expect(inst.superclass).toBe(TNSIBaseInterface, "Actual class inherits from TNSIBaseInterface");
21372139
expect(inst.constructor).not.toBe(global.TNSIBaseInterface, "The constructor which is wrapping an unknown interface should be different than the pure one");
21382140
});
2139-
2141+
21402142
it("TNSIBaseInterface returned as id<TNSIBaseProtocol>", function () {
21412143
var inst = TNSPrivateInterfaceResults.instanceFromPublicTypeImplementingProtocol();
21422144

0 commit comments

Comments
 (0)