-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathMetadataTests.js
More file actions
24 lines (23 loc) · 1.26 KB
/
MetadataTests.js
File metadata and controls
24 lines (23 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
describe("Metadata", function () {
it("where method in category is implemented with property, the property access and modification should work and the method should be 'hidden'.", function () {
var object = TNSPropertyMethodConflictClass.alloc().init();
expect(object.conflict).toBe(false);
});
it("Swift objects should be marshalled correctly", function () {
expect(global.TNSSwiftLikeFactory).toBeDefined();
expect(global.TNSSwiftLikeFactory.name).toBe("TNSSwiftLikeFactory");
const swiftLikeObj = TNSSwiftLikeFactory.create();
expect(swiftLikeObj.constructor).toBe(global.TNSSwiftLike);
expect(swiftLikeObj.constructor.name).toBe("_TtC17NativeScriptTests12TNSSwiftLike");
let majorVersion = 13;
let minorVersion = 4;
if (isVision) {
majorVersion = 1;
minorVersion = 0;
}
var expectedName = NSProcessInfo.processInfo.isOperatingSystemAtLeastVersion({ majorVersion: majorVersion, minorVersion: minorVersion, patchVersion: 0 })
? "_TtC17NativeScriptTests12TNSSwiftLike"
: "NativeScriptTests.TNSSwiftLike";
expect(NSString.stringWithUTF8String(class_getName(swiftLikeObj.constructor)).toString()).toBe(expectedName);
});
});