Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

iOS/unit tests #519

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vcx/libvcx/build_scripts/ios/mac/mac.13.build.cocoapod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ IFS="$bkpIFS"
cd $VCX_SDK/vcx/wrappers/ios/vcx
#mv lib/libvcx.a lib/libvcx.a.original
cp -v lib/${COMBINED_LIB}.a lib/libvcx.a

xcodebuild -project vcx.xcodeproj -scheme vcx -configuration Debug CONFIGURATION_BUILD_DIR=. clean

if [ "${COMBINED_LIB}" = "libvcxall" ]; then
xcodebuild test -project vcx.xcodeproj -scheme vcxTests -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2'
fi

rm -rf vcx.framework.previousbuild
IPHONE_SDK=iphoneos
for arch in ${archs[*]}
Expand Down
Binary file added vcx/wrappers/ios/vcx/vcx.framework/Info.plist
Binary file not shown.
181 changes: 181 additions & 0 deletions vcx/wrappers/ios/vcx/vcx.framework/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/ConnectMeVcx.h</key>
<data>
7eDc0QmVKsCIVP0Ek/7QFMfICfo=
</data>
<key>Headers/libvcx.h</key>
<data>
2VgFWkgV/zUP5ilbdOD+y1Epp3k=
</data>
<key>Headers/vcx.h</key>
<data>
JKXkX9CRNomxvOns+bj7iR2/5gk=
</data>
<key>Info.plist</key>
<data>
nj0zex2D1+Q4X7rzS7eIQHGfgI0=
</data>
<key>Modules/module.modulemap</key>
<data>
xgDxI7dRoRGp+H/tEl/6ympByJs=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/ConnectMeVcx.h</key>
<dict>
<key>hash</key>
<data>
7eDc0QmVKsCIVP0Ek/7QFMfICfo=
</data>
<key>hash2</key>
<data>
Kk/XQWy2PANGzMKr//LNgdFQD1J5vQHcQcCRzwWM530=
</data>
</dict>
<key>Headers/libvcx.h</key>
<dict>
<key>hash</key>
<data>
2VgFWkgV/zUP5ilbdOD+y1Epp3k=
</data>
<key>hash2</key>
<data>
o+AXuTqFZO81K96w5azo/BgvcpNPIlt7IEHb4PvxocM=
</data>
</dict>
<key>Headers/vcx.h</key>
<dict>
<key>hash</key>
<data>
JKXkX9CRNomxvOns+bj7iR2/5gk=
</data>
<key>hash2</key>
<data>
K9kamsfqa0jFBMxQGXqVxAk19CjnvXR44h3LhDjBpS0=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
<data>
xgDxI7dRoRGp+H/tEl/6ympByJs=
</data>
<key>hash2</key>
<data>
Cezqzeou/Fbbna+jGhr5Xf6ZDnnB3gFwlEEod80Ng4Q=
</data>
</dict>
</dict>
<key>rules</key>
<dict>
<key>^</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
4 changes: 2 additions & 2 deletions vcx/wrappers/ios/vcx/vcx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "co.evernym.vcx-objc.vcx";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos11.2;
SDKROOT = iphoneos;
SKIP_INSTALL = NO;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -779,7 +779,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "co.evernym.vcx-objc.vcx";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos11.2;
SDKROOT = iphoneos;
SKIP_INSTALL = NO;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>vcx-demo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>vcx-objc.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>vcx.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Binary file added vcx/wrappers/ios/vcx/vcxTests.xctest/Info.plist
Binary file not shown.
120 changes: 120 additions & 0 deletions vcx/wrappers/ios/vcx/vcxTests.xctest/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Info.plist</key>
<data>
mrkkJF/A+JtPY9KE8j7ra20RiqY=
</data>
</dict>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
Binary file added vcx/wrappers/ios/vcx/vcxTests.xctest/vcxTests
Binary file not shown.
5 changes: 5 additions & 0 deletions vcx/wrappers/ios/vcx/vcxTests/vcxTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ - (void)testExample {
// Use XCTAssert and related functions to verify your tests produce the correct results.
}

- (void)testRoot {
NSString *testString = @"root vcxTest";
XCTAssert([testString length] != 0, "ROOT TEST");
}

- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
Expand Down
2 changes: 2 additions & 0 deletions vcx/wrappers/node/ci/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e
cd vcx/wrappers/node/
npm i
npm audit
npm run lint
npm run compile
npm test