Browse Source

Begin changing over to GoogleTest.
- Modify project settings.
- Rename files.
Migrate to proper include directory pattern.

Sam Jaffe 6 years ago
parent
commit
95d9ea87d5

+ 22 - 0
either.stream-test/Info.plist

@@ -0,0 +1,22 @@
+<?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>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+</dict>
+</plist>

+ 160 - 62
either.stream.xcodeproj/project.pbxproj

@@ -7,33 +7,55 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		CD407BE31E42D45A00BBA0D5 /* either_stream_tc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD407BE11E42D45A00BBA0D5 /* either_stream_tc.cpp */; };
+		CDEC1E4E23520D340091D9F2 /* either_stream_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CDEC1E3D23520D130091D9F2 /* either_stream_test.cxx */; };
+		CDEC1E5023520D380091D9F2 /* GoogleMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDEC1D91235166330091D9F2 /* GoogleMock.framework */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXCopyFilesBuildPhase section */
-		CD407BD01E42D42B00BBA0D5 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = /usr/share/man/man1/;
-			dstSubfolderSpec = 0;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 1;
+/* Begin PBXContainerItemProxy section */
+		CDEC1D90235166330091D9F2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 05818F861A685AEA0072A469;
+			remoteInfo = GoogleMock;
+		};
+		CDEC1D92235166330091D9F2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 05E96ABD1A68600C00204102;
+			remoteInfo = gmock;
 		};
-/* End PBXCopyFilesBuildPhase section */
+		CDEC1D94235166330091D9F2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 05E96B1F1A68634900204102;
+			remoteInfo = gtest;
+		};
+		CDEC1D96235166330091D9F2 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 05818F901A685AEA0072A469;
+			remoteInfo = GoogleMockTests;
+		};
+/* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
-		CD407BD21E42D42B00BBA0D5 /* either_stream_tc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = either_stream_tc; sourceTree = BUILT_PRODUCTS_DIR; };
-		CD407BDD1E42D45400BBA0D5 /* either_stream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = either_stream.hpp; sourceTree = "<group>"; };
-		CD407BE01E42D45A00BBA0D5 /* either_stream.t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = either_stream.t.h; sourceTree = "<group>"; };
-		CD407BE11E42D45A00BBA0D5 /* either_stream_tc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = either_stream_tc.cpp; sourceTree = "<group>"; };
+		CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GoogleMock.xcodeproj; path = "../../../../gmock-xcode-master/GoogleMock.xcodeproj"; sourceTree = "<group>"; };
+		CDEC1E2123520CAA0091D9F2 /* stream */ = {isa = PBXFileReference; lastKnownFileType = folder; name = stream; path = include/stream; sourceTree = "<group>"; };
+		CDEC1E3D23520D130091D9F2 /* either_stream_test.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = either_stream_test.cxx; sourceTree = "<group>"; };
+		CDEC1E4623520D270091D9F2 /* either.stream-test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "either.stream-test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		CDEC1E4A23520D270091D9F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
-		CD407BCF1E42D42B00BBA0D5 /* Frameworks */ = {
+		CDEC1E4323520D270091D9F2 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				CDEC1E5023520D380091D9F2 /* GoogleMock.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -43,57 +65,76 @@
 		CD407BC91E42D42B00BBA0D5 = {
 			isa = PBXGroup;
 			children = (
-				CD407BDE1E42D45400BBA0D5 /* src */,
+				CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */,
+				CDEC1E2123520CAA0091D9F2 /* stream */,
 				CD407BE21E42D45A00BBA0D5 /* test */,
+				CDEC1E4723520D270091D9F2 /* either.stream-test */,
 				CD407BD31E42D42B00BBA0D5 /* Products */,
+				CDEC1E4F23520D380091D9F2 /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
 		CD407BD31E42D42B00BBA0D5 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				CD407BD21E42D42B00BBA0D5 /* either_stream_tc */,
+				CDEC1E4623520D270091D9F2 /* either.stream-test.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
 		};
-		CD407BDE1E42D45400BBA0D5 /* src */ = {
+		CD407BE21E42D45A00BBA0D5 /* test */ = {
+			isa = PBXGroup;
+			children = (
+				CDEC1E3D23520D130091D9F2 /* either_stream_test.cxx */,
+			);
+			path = test;
+			sourceTree = "<group>";
+		};
+		CDEC1D8A235166330091D9F2 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				CD407BDD1E42D45400BBA0D5 /* either_stream.hpp */,
+				CDEC1D91235166330091D9F2 /* GoogleMock.framework */,
+				CDEC1D93235166330091D9F2 /* gmock.framework */,
+				CDEC1D95235166330091D9F2 /* gtest.framework */,
+				CDEC1D97235166330091D9F2 /* GoogleMockTests.xctest */,
 			);
-			name = src;
+			name = Products;
 			sourceTree = "<group>";
 		};
-		CD407BE21E42D45A00BBA0D5 /* test */ = {
+		CDEC1E4723520D270091D9F2 /* either.stream-test */ = {
 			isa = PBXGroup;
 			children = (
-				CD407BE01E42D45A00BBA0D5 /* either_stream.t.h */,
-				CD407BE11E42D45A00BBA0D5 /* either_stream_tc.cpp */,
+				CDEC1E4A23520D270091D9F2 /* Info.plist */,
 			);
-			name = test;
+			path = "either.stream-test";
+			sourceTree = "<group>";
+		};
+		CDEC1E4F23520D380091D9F2 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = Frameworks;
 			sourceTree = "<group>";
 		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
-		CD407BD11E42D42B00BBA0D5 /* either_stream_tc */ = {
+		CDEC1E4523520D270091D9F2 /* either.stream-test */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = CD407BD91E42D42B00BBA0D5 /* Build configuration list for PBXNativeTarget "either_stream_tc" */;
+			buildConfigurationList = CDEC1E4B23520D270091D9F2 /* Build configuration list for PBXNativeTarget "either.stream-test" */;
 			buildPhases = (
-				CD407BE41E42D4AE00BBA0D5 /* ShellScript */,
-				CD407BCE1E42D42B00BBA0D5 /* Sources */,
-				CD407BCF1E42D42B00BBA0D5 /* Frameworks */,
-				CD407BD01E42D42B00BBA0D5 /* CopyFiles */,
+				CDEC1E4223520D270091D9F2 /* Sources */,
+				CDEC1E4323520D270091D9F2 /* Frameworks */,
+				CDEC1E4423520D270091D9F2 /* Resources */,
 			);
 			buildRules = (
 			);
 			dependencies = (
 			);
-			name = either_stream_tc;
-			productName = either.stream;
-			productReference = CD407BD21E42D42B00BBA0D5 /* either_stream_tc */;
-			productType = "com.apple.product-type.tool";
+			name = "either.stream-test";
+			productName = "either.stream-test";
+			productReference = CDEC1E4623520D270091D9F2 /* either.stream-test.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
 		};
 /* End PBXNativeTarget section */
 
@@ -101,11 +142,12 @@
 		CD407BCA1E42D42B00BBA0D5 /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 1030;
+				LastUpgradeCheck = 1110;
 				ORGANIZATIONNAME = "Sam Jaffe";
 				TargetAttributes = {
-					CD407BD11E42D42B00BBA0D5 = {
-						CreatedOnToolsVersion = 7.2.1;
+					CDEC1E4523520D270091D9F2 = {
+						CreatedOnToolsVersion = 11.1;
+						ProvisioningStyle = Automatic;
 					};
 				};
 			};
@@ -120,37 +162,66 @@
 			mainGroup = CD407BC91E42D42B00BBA0D5;
 			productRefGroup = CD407BD31E42D42B00BBA0D5 /* Products */;
 			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = CDEC1D8A235166330091D9F2 /* Products */;
+					ProjectRef = CDEC1D89235166330091D9F2 /* GoogleMock.xcodeproj */;
+				},
+			);
 			projectRoot = "";
 			targets = (
-				CD407BD11E42D42B00BBA0D5 /* either_stream_tc */,
+				CDEC1E4523520D270091D9F2 /* either.stream-test */,
 			);
 		};
 /* End PBXProject section */
 
-/* Begin PBXShellScriptBuildPhase section */
-		CD407BE41E42D4AE00BBA0D5 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
+/* Begin PBXReferenceProxy section */
+		CDEC1D91235166330091D9F2 /* GoogleMock.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = GoogleMock.framework;
+			remoteRef = CDEC1D90235166330091D9F2 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		CDEC1D93235166330091D9F2 /* gmock.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = gmock.framework;
+			remoteRef = CDEC1D92235166330091D9F2 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		CDEC1D95235166330091D9F2 /* gtest.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = gtest.framework;
+			remoteRef = CDEC1D94235166330091D9F2 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		CDEC1D97235166330091D9F2 /* GoogleMockTests.xctest */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.cfbundle;
+			path = GoogleMockTests.xctest;
+			remoteRef = CDEC1D96235166330091D9F2 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		CDEC1E4423520D270091D9F2 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
-			inputPaths = (
-				"$(SRCROOT)/either_stream.t.h",
-			);
-			outputPaths = (
-				"$(SRCROOT)/either_stream_tc.cpp",
-			);
 			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "cxxtestgen --error-printer -o either_stream_tc.cpp either_stream.t.h";
 		};
-/* End PBXShellScriptBuildPhase section */
+/* End PBXResourcesBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
-		CD407BCE1E42D42B00BBA0D5 /* Sources */ = {
+		CDEC1E4223520D270091D9F2 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD407BE31E42D45A00BBA0D5 /* either_stream_tc.cpp in Sources */,
+				CDEC1E4E23520D340091D9F2 /* either_stream_test.cxx in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -208,6 +279,7 @@
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = ./include/;
 			};
 			name = Debug;
 		};
@@ -255,24 +327,50 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = ./include/;
 			};
 			name = Release;
 		};
-		CD407BDA1E42D42B00BBA0D5 /* Debug */ = {
+		CDEC1E4C23520D270091D9F2 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				HEADER_SEARCH_PATHS = /usr/local/include/;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				INFOPLIST_FILE = "either.stream-test/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.either-stream-test";
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = ../../../types/;
 			};
 			name = Debug;
 		};
-		CD407BDB1E42D42B00BBA0D5 /* Release */ = {
+		CDEC1E4D23520D270091D9F2 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				HEADER_SEARCH_PATHS = /usr/local/include/;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				INFOPLIST_FILE = "either.stream-test/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MTL_FAST_MATH = YES;
+				PRODUCT_BUNDLE_IDENTIFIER = "leumasjaffe.either-stream-test";
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = ../../../types/;
 			};
 			name = Release;
 		};
@@ -288,11 +386,11 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		CD407BD91E42D42B00BBA0D5 /* Build configuration list for PBXNativeTarget "either_stream_tc" */ = {
+		CDEC1E4B23520D270091D9F2 /* Build configuration list for PBXNativeTarget "either.stream-test" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				CD407BDA1E42D42B00BBA0D5 /* Debug */,
-				CD407BDB1E42D42B00BBA0D5 /* Release */,
+				CDEC1E4C23520D270091D9F2 /* Debug */,
+				CDEC1E4D23520D270091D9F2 /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;

either_stream.hpp → include/stream/either_stream.hpp


either_stream.t.h → test/either_stream_test.cxx