Updating the xcode/Samples.
This commit is contained in:
parent
172b233a04
commit
0928f00c6b
@ -6,13 +6,40 @@
|
|||||||
objectVersion = 42;
|
objectVersion = 42;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXAggregateTarget section */
|
||||||
|
4024D162113D7D2400C7059E /* Test */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 4024D169113D7D4600C7059E /* Build configuration list for PBXAggregateTarget "Test" */;
|
||||||
|
buildPhases = (
|
||||||
|
4024D161113D7D2400C7059E /* ShellScript */,
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
4024D166113D7D3100C7059E /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = Test;
|
||||||
|
productName = TestAndBuild;
|
||||||
|
};
|
||||||
|
4024D1E9113D83FF00C7059E /* TestAndBuild */ = {
|
||||||
|
isa = PBXAggregateTarget;
|
||||||
|
buildConfigurationList = 4024D1F0113D842B00C7059E /* Build configuration list for PBXAggregateTarget "TestAndBuild" */;
|
||||||
|
buildPhases = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
4024D1ED113D840900C7059E /* PBXTargetDependency */,
|
||||||
|
4024D1EF113D840D00C7059E /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = TestAndBuild;
|
||||||
|
productName = TestAndBuild;
|
||||||
|
};
|
||||||
|
/* End PBXAggregateTarget section */
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
3B7EB1250E5AEE3500C7F239 /* widget.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B7EB1230E5AEE3500C7F239 /* widget.cc */; };
|
3B7EB1250E5AEE3500C7F239 /* widget.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B7EB1230E5AEE3500C7F239 /* widget.cc */; };
|
||||||
3B7EB1260E5AEE3500C7F239 /* widget.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7EB1240E5AEE3500C7F239 /* widget.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
3B7EB1260E5AEE3500C7F239 /* widget.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B7EB1240E5AEE3500C7F239 /* widget.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
3B7EB1280E5AEE4600C7F239 /* widget_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B7EB1270E5AEE4600C7F239 /* widget_test.cc */; };
|
3B7EB1280E5AEE4600C7F239 /* widget_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3B7EB1270E5AEE4600C7F239 /* widget_test.cc */; };
|
||||||
3B7EB1480E5AF3B400C7F239 /* Widget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* Widget.framework */; };
|
3B7EB1480E5AF3B400C7F239 /* Widget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D07F2C80486CC7A007CD1D0 /* Widget.framework */; };
|
||||||
408BEC281046D72200DEF522 /* gtest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 408BEC271046D72200DEF522 /* gtest.framework */; };
|
4024D188113D7D7800C7059E /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4024D185113D7D5500C7059E /* libgtest.a */; };
|
||||||
408BEC431046D7B300DEF522 /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 408BEC421046D7B300DEF522 /* libgtest_main.a */; };
|
4024D189113D7D7A00C7059E /* libgtest_main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4024D183113D7D5500C7059E /* libgtest_main.a */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -23,6 +50,27 @@
|
|||||||
remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
|
remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
|
||||||
remoteInfo = gTestExample;
|
remoteInfo = gTestExample;
|
||||||
};
|
};
|
||||||
|
4024D165113D7D3100C7059E /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 3B07BDE90E3F3F9E00647869;
|
||||||
|
remoteInfo = WidgetFrameworkTest;
|
||||||
|
};
|
||||||
|
4024D1EC113D840900C7059E /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
|
||||||
|
remoteInfo = WidgetFramework;
|
||||||
|
};
|
||||||
|
4024D1EE113D840D00C7059E /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 4024D162113D7D2400C7059E;
|
||||||
|
remoteInfo = Test;
|
||||||
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
@ -30,8 +78,9 @@
|
|||||||
3B7EB1230E5AEE3500C7F239 /* widget.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = widget.cc; sourceTree = "<group>"; };
|
3B7EB1230E5AEE3500C7F239 /* widget.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = widget.cc; sourceTree = "<group>"; };
|
||||||
3B7EB1240E5AEE3500C7F239 /* widget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = widget.h; sourceTree = "<group>"; };
|
3B7EB1240E5AEE3500C7F239 /* widget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = widget.h; sourceTree = "<group>"; };
|
||||||
3B7EB1270E5AEE4600C7F239 /* widget_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = widget_test.cc; sourceTree = "<group>"; };
|
3B7EB1270E5AEE4600C7F239 /* widget_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = widget_test.cc; sourceTree = "<group>"; };
|
||||||
408BEC271046D72200DEF522 /* gtest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = gtest.framework; path = /Library/Frameworks/gtest.framework; sourceTree = "<absolute>"; };
|
4024D183113D7D5500C7059E /* libgtest_main.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgtest_main.a; path = /usr/local/lib/libgtest_main.a; sourceTree = "<absolute>"; };
|
||||||
408BEC421046D7B300DEF522 /* libgtest_main.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgtest_main.a; path = /Library/Frameworks/gtest.framework/Versions/A/Resources/libgtest_main.a; sourceTree = "<absolute>"; };
|
4024D185113D7D5500C7059E /* libgtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgtest.a; path = /usr/local/lib/libgtest.a; sourceTree = "<absolute>"; };
|
||||||
|
4024D1E2113D838200C7059E /* runtests.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = runtests.sh; sourceTree = "<group>"; };
|
||||||
8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||||
8D07F2C80486CC7A007CD1D0 /* Widget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Widget.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
8D07F2C80486CC7A007CD1D0 /* Widget.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Widget.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
@ -41,9 +90,9 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
4024D189113D7D7A00C7059E /* libgtest_main.a in Frameworks */,
|
||||||
|
4024D188113D7D7800C7059E /* libgtest.a in Frameworks */,
|
||||||
3B7EB1480E5AF3B400C7F239 /* Widget.framework in Frameworks */,
|
3B7EB1480E5AF3B400C7F239 /* Widget.framework in Frameworks */,
|
||||||
408BEC281046D72200DEF522 /* gtest.framework in Frameworks */,
|
|
||||||
408BEC431046D7B300DEF522 /* libgtest_main.a in Frameworks */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -69,6 +118,7 @@
|
|||||||
0867D691FE84028FC02AAC07 /* gTestExample */ = {
|
0867D691FE84028FC02AAC07 /* gTestExample */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
4024D1E1113D836C00C7059E /* Scripts */,
|
||||||
08FB77ACFE841707C02AAC07 /* Source */,
|
08FB77ACFE841707C02AAC07 /* Source */,
|
||||||
089C1665FE841158C02AAC07 /* Resources */,
|
089C1665FE841158C02AAC07 /* Resources */,
|
||||||
3B07BE350E4094E400647869 /* Test */,
|
3B07BE350E4094E400647869 /* Test */,
|
||||||
@ -81,8 +131,8 @@
|
|||||||
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
408BEC421046D7B300DEF522 /* libgtest_main.a */,
|
4024D183113D7D5500C7059E /* libgtest_main.a */,
|
||||||
408BEC271046D72200DEF522 /* gtest.framework */,
|
4024D185113D7D5500C7059E /* libgtest.a */,
|
||||||
);
|
);
|
||||||
name = "External Frameworks and Libraries";
|
name = "External Frameworks and Libraries";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -112,6 +162,14 @@
|
|||||||
name = Test;
|
name = Test;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
4024D1E1113D836C00C7059E /* Scripts */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
4024D1E2113D838200C7059E /* runtests.sh */,
|
||||||
|
);
|
||||||
|
name = Scripts;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXHeadersBuildPhase section */
|
/* Begin PBXHeadersBuildPhase section */
|
||||||
@ -178,6 +236,8 @@
|
|||||||
targets = (
|
targets = (
|
||||||
8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */,
|
8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */,
|
||||||
3B07BDE90E3F3F9E00647869 /* WidgetFrameworkTest */,
|
3B07BDE90E3F3F9E00647869 /* WidgetFrameworkTest */,
|
||||||
|
4024D162113D7D2400C7059E /* Test */,
|
||||||
|
4024D1E9113D83FF00C7059E /* TestAndBuild */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@ -202,6 +262,22 @@
|
|||||||
};
|
};
|
||||||
/* End PBXRezBuildPhase section */
|
/* End PBXRezBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
4024D161113D7D2400C7059E /* ShellScript */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/bash $SRCROOT/runtests.sh $BUILT_PRODUCTS_DIR/WidgetFrameworkTest\n";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
3B07BDE70E3F3F9E00647869 /* Sources */ = {
|
3B07BDE70E3F3F9E00647869 /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
@ -227,6 +303,21 @@
|
|||||||
target = 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */;
|
target = 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */;
|
||||||
targetProxy = 3B07BDF00E3F3FAE00647869 /* PBXContainerItemProxy */;
|
targetProxy = 3B07BDF00E3F3FAE00647869 /* PBXContainerItemProxy */;
|
||||||
};
|
};
|
||||||
|
4024D166113D7D3100C7059E /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 3B07BDE90E3F3F9E00647869 /* WidgetFrameworkTest */;
|
||||||
|
targetProxy = 4024D165113D7D3100C7059E /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
4024D1ED113D840900C7059E /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 8D07F2BC0486CC7A007CD1D0 /* WidgetFramework */;
|
||||||
|
targetProxy = 4024D1EC113D840900C7059E /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
4024D1EF113D840D00C7059E /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 4024D162113D7D2400C7059E /* Test */;
|
||||||
|
targetProxy = 4024D1EE113D840D00C7059E /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
/* End PBXTargetDependency section */
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
@ -244,6 +335,34 @@
|
|||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
4024D163113D7D2400C7059E /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = TestAndBuild;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
4024D164113D7D2400C7059E /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = TestAndBuild;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
4024D1EA113D83FF00C7059E /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = TestAndBuild;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
4024D1EB113D83FF00C7059E /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
PRODUCT_NAME = TestAndBuild;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
4FADC24308B4156D00ABE55E /* Debug */ = {
|
4FADC24308B4156D00ABE55E /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
@ -296,6 +415,24 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
|
4024D169113D7D4600C7059E /* Build configuration list for PBXAggregateTarget "Test" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
4024D163113D7D2400C7059E /* Debug */,
|
||||||
|
4024D164113D7D2400C7059E /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
4024D1F0113D842B00C7059E /* Build configuration list for PBXAggregateTarget "TestAndBuild" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
4024D1EA113D83FF00C7059E /* Debug */,
|
||||||
|
4024D1EB113D83FF00C7059E /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "WidgetFramework" */ = {
|
4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "WidgetFramework" */ = {
|
||||||
isa = XCConfigurationList;
|
isa = XCConfigurationList;
|
||||||
buildConfigurations = (
|
buildConfigurations = (
|
||||||
|
62
xcode/Samples/FrameworkSample/runtests.sh
Normal file
62
xcode/Samples/FrameworkSample/runtests.sh
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright 2008, Google Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
#
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following disclaimer
|
||||||
|
# in the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# * Neither the name of Google Inc. nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived from
|
||||||
|
# this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
# Executes the samples and tests for the Google Test Framework.
|
||||||
|
|
||||||
|
# Help the dynamic linker find the path to the libraries.
|
||||||
|
export DYLD_FRAMEWORK_PATH=$BUILT_PRODUCTS_DIR
|
||||||
|
export DYLD_LIBRARY_PATH=$BUILT_PRODUCTS_DIR
|
||||||
|
|
||||||
|
# Create some executables.
|
||||||
|
test_executables=$@
|
||||||
|
|
||||||
|
# Now execute each one in turn keeping track of how many succeeded and failed.
|
||||||
|
succeeded=0
|
||||||
|
failed=0
|
||||||
|
failed_list=()
|
||||||
|
for test in ${test_executables[*]}; do
|
||||||
|
"$test"
|
||||||
|
result=$?
|
||||||
|
if [ $result -eq 0 ]; then
|
||||||
|
succeeded=$(( $succeeded + 1 ))
|
||||||
|
else
|
||||||
|
failed=$(( failed + 1 ))
|
||||||
|
failed_list="$failed_list $test"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Report the successes and failures to the console.
|
||||||
|
echo "Tests complete with $succeeded successes and $failed failures."
|
||||||
|
if [ $failed -ne 0 ]; then
|
||||||
|
echo "The following tests failed:"
|
||||||
|
echo $failed_list
|
||||||
|
fi
|
||||||
|
exit $failed
|
@ -27,7 +27,7 @@
|
|||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
//
|
//
|
||||||
// Author: preston.jackson@gmail.com (Preston Jackson)
|
// Author: preston.a.jackson@gmail.com (Preston Jackson)
|
||||||
//
|
//
|
||||||
// Google Test - FrameworkSample
|
// Google Test - FrameworkSample
|
||||||
// widget.cc
|
// widget.cc
|
||||||
@ -42,7 +42,7 @@ Widget::Widget(int number, const std::string& name)
|
|||||||
name_(name) {}
|
name_(name) {}
|
||||||
|
|
||||||
Widget::~Widget() {}
|
Widget::~Widget() {}
|
||||||
|
|
||||||
float Widget::GetFloatValue() const {
|
float Widget::GetFloatValue() const {
|
||||||
return number_;
|
return number_;
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ float Widget::GetFloatValue() const {
|
|||||||
int Widget::GetIntValue() const {
|
int Widget::GetIntValue() const {
|
||||||
return static_cast<int>(number_);
|
return static_cast<int>(number_);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Widget::GetStringValue() const {
|
std::string Widget::GetStringValue() const {
|
||||||
return name_;
|
return name_;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
//
|
//
|
||||||
// Author: preston.jackson@gmail.com (Preston Jackson)
|
// Author: preston.a.jackson@gmail.com (Preston Jackson)
|
||||||
//
|
//
|
||||||
// Google Test - FrameworkSample
|
// Google Test - FrameworkSample
|
||||||
// widget.h
|
// widget.h
|
||||||
@ -43,15 +43,15 @@ class Widget {
|
|||||||
public:
|
public:
|
||||||
Widget(int number, const std::string& name);
|
Widget(int number, const std::string& name);
|
||||||
~Widget();
|
~Widget();
|
||||||
|
|
||||||
// Public accessors to number data
|
// Public accessors to number data
|
||||||
float GetFloatValue() const;
|
float GetFloatValue() const;
|
||||||
int GetIntValue() const;
|
int GetIntValue() const;
|
||||||
|
|
||||||
// Public accessors to the string data
|
// Public accessors to the string data
|
||||||
std::string GetStringValue() const;
|
std::string GetStringValue() const;
|
||||||
void GetCharPtrValue(char* buffer, size_t max_size) const;
|
void GetCharPtrValue(char* buffer, size_t max_size) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data members
|
// Data members
|
||||||
float number_;
|
float number_;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
//
|
//
|
||||||
// Author: preston.jackson@gmail.com (Preston Jackson)
|
// Author: preston.a.jackson@gmail.com (Preston Jackson)
|
||||||
//
|
//
|
||||||
// Google Test - FrameworkSample
|
// Google Test - FrameworkSample
|
||||||
// widget_test.cc
|
// widget_test.cc
|
||||||
@ -58,7 +58,7 @@ TEST(WidgetInitializerTest, TestConversion) {
|
|||||||
char buffer[max_size];
|
char buffer[max_size];
|
||||||
widget.GetCharPtrValue(buffer, max_size);
|
widget.GetCharPtrValue(buffer, max_size);
|
||||||
EXPECT_STREQ("name", buffer);
|
EXPECT_STREQ("name", buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the Google Test main that is linked into the framework. It does something
|
// Use the Google Test main that is linked into the framework. It does something
|
||||||
// like this:
|
// like this:
|
||||||
|
Loading…
Reference in New Issue
Block a user