Pārlūkot izejas kodu

Fix spelling error Arithmatic -> Arithmetic

Sam Jaffe 5 gadi atpakaļ
vecāks
revīzija
b95d26c73c

+ 2 - 2
include/opaque_typedef/arithmatic.hpp

@@ -33,7 +33,7 @@ namespace types {
   };
     
   template <typename Self>
-  struct Arithmatic : Addable<Self> {
+  struct Arithmetic : Addable<Self> {
     friend Self operator-(Self const & self) {
       return Self(-self.get());
     }
@@ -44,7 +44,7 @@ namespace types {
   };
 
   template <typename Self>
-  struct Numeric : Arithmatic<Self> {
+  struct Numeric : Arithmetic<Self> {
     friend Self operator*(Self const & lhs, Self const & rhs) {
       return Self(lhs.get() * rhs.get());
     }

+ 1 - 1
include/opaque_typedef/opaque_typedef.hpp

@@ -11,7 +11,7 @@
 
 #include <utility>
 
-#include "arithmatic.hpp"
+#include "arithmetic.hpp"
 #include "comparable.hpp"
 
 namespace types {

+ 8 - 8
opaque_typedef.xcodeproj/project.pbxproj

@@ -11,8 +11,8 @@
 		CD70491520C48B8C007C944C /* GoogleMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD7048FB20C48B30007C944C /* GoogleMock.framework */; };
 		CDE8546724DF5051006FE7C7 /* opaque_typedef in Resources */ = {isa = PBXBuildFile; fileRef = CDE8546624DF5051006FE7C7 /* opaque_typedef */; };
 		CDE8547324DF80EE006FE7C7 /* opaque_typedef_comparable_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CDE8547224DF80EE006FE7C7 /* opaque_typedef_comparable_test.cxx */; };
-		CDE8547524DF8110006FE7C7 /* opaque_typedef_adhoc_arithmatic_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CDE8547424DF8110006FE7C7 /* opaque_typedef_adhoc_arithmatic_test.cxx */; };
-		CDE8547724DF8A6A006FE7C7 /* opaque_typedef_arithmatic_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CDE8547624DF8A6A006FE7C7 /* opaque_typedef_arithmatic_test.cxx */; };
+		CDE8547524DF8110006FE7C7 /* opaque_typedef_adhoc_arithmetic_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CDE8547424DF8110006FE7C7 /* opaque_typedef_adhoc_arithmetic_test.cxx */; };
+		CDE8547724DF8A6A006FE7C7 /* opaque_typedef_arithmetic_test.cxx in Sources */ = {isa = PBXBuildFile; fileRef = CDE8547624DF8A6A006FE7C7 /* opaque_typedef_arithmetic_test.cxx */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -60,8 +60,8 @@
 		CD70490B20C48B75007C944C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		CDE8546624DF5051006FE7C7 /* opaque_typedef */ = {isa = PBXFileReference; lastKnownFileType = folder; name = opaque_typedef; path = include/opaque_typedef; sourceTree = "<group>"; };
 		CDE8547224DF80EE006FE7C7 /* opaque_typedef_comparable_test.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = opaque_typedef_comparable_test.cxx; sourceTree = "<group>"; };
-		CDE8547424DF8110006FE7C7 /* opaque_typedef_adhoc_arithmatic_test.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = opaque_typedef_adhoc_arithmatic_test.cxx; sourceTree = "<group>"; };
-		CDE8547624DF8A6A006FE7C7 /* opaque_typedef_arithmatic_test.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = opaque_typedef_arithmatic_test.cxx; sourceTree = "<group>"; };
+		CDE8547424DF8110006FE7C7 /* opaque_typedef_adhoc_arithmetic_test.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = opaque_typedef_adhoc_arithmetic_test.cxx; sourceTree = "<group>"; };
+		CDE8547624DF8A6A006FE7C7 /* opaque_typedef_arithmetic_test.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = opaque_typedef_arithmetic_test.cxx; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -100,8 +100,8 @@
 			children = (
 				CD7048F020C48AE4007C944C /* opaque_typedef_conversion_test.cxx */,
 				CDE8547224DF80EE006FE7C7 /* opaque_typedef_comparable_test.cxx */,
-				CDE8547424DF8110006FE7C7 /* opaque_typedef_adhoc_arithmatic_test.cxx */,
-				CDE8547624DF8A6A006FE7C7 /* opaque_typedef_arithmatic_test.cxx */,
+				CDE8547424DF8110006FE7C7 /* opaque_typedef_adhoc_arithmetic_test.cxx */,
+				CDE8547624DF8A6A006FE7C7 /* opaque_typedef_arithmetic_test.cxx */,
 			);
 			path = test;
 			sourceTree = "<group>";
@@ -231,9 +231,9 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CDE8547524DF8110006FE7C7 /* opaque_typedef_adhoc_arithmatic_test.cxx in Sources */,
+				CDE8547524DF8110006FE7C7 /* opaque_typedef_adhoc_arithmetic_test.cxx in Sources */,
 				CDE8547324DF80EE006FE7C7 /* opaque_typedef_comparable_test.cxx in Sources */,
-				CDE8547724DF8A6A006FE7C7 /* opaque_typedef_arithmatic_test.cxx in Sources */,
+				CDE8547724DF8A6A006FE7C7 /* opaque_typedef_arithmetic_test.cxx in Sources */,
 				CD70491220C48B7C007C944C /* opaque_typedef_conversion_test.cxx in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
test/opaque_typedef_adhoc_arithmatic_test.cxx

@@ -9,7 +9,7 @@
 #include <gmock/gmock.h>
 #include <cmath>
 
-#include "opaque_typedef/arithmatic.hpp"
+#include "opaque_typedef/arithmetic.hpp"
 #include "opaque_typedef/opaque_typedef.hpp"
 
 

+ 5 - 5
test/opaque_typedef_arithmatic_test.cxx

@@ -8,7 +8,7 @@
 
 #include <gmock/gmock.h>
 
-#include "opaque_typedef/arithmatic.hpp"
+#include "opaque_typedef/arithmetic.hpp"
 #include "opaque_typedef/opaque_typedef.hpp"
 
 // Allow Eq() checks without needing the Skill EqualityComparable
@@ -34,7 +34,7 @@ using counter = opaque_typedef<uint32_t, struct counter_tag, Incrementable>;
 using countdown = opaque_typedef<uint32_t, struct countdown_tag, Decrementable>;
 using idx = opaque_typedef<uint32_t, struct idx_tag, Incrementable, Decrementable>;
 using timer = opaque_typedef<double, struct timer_tag, Addable>;
-using price = opaque_typedef<double, struct price_tag, Arithmatic>;
+using price = opaque_typedef<double, struct price_tag, Arithmetic>;
 using shares = opaque_typedef<double, struct shares_tag, Numeric>;
 
 // Actual Test Bodies
@@ -98,20 +98,20 @@ TEST(OpaqueTypedefAddableTest, AddPassesThroughToBase) {
   EXPECT_THAT(t+t, testing::Eq(timer(10.0)));
 }
 
-TEST(OpaqueTypedefArithmaticTest, CannotMultiplyOrDivide) {
+TEST(OpaqueTypedefArithmeticTest, CannotMultiplyOrDivide) {
   price p{99.99};
   EXPECT_TRUE((testing::StaticAssertTypeEq<void, decltype(p*p)>()));
   EXPECT_TRUE((testing::StaticAssertTypeEq<void, decltype(p/p)>()));
 }
 
-TEST(OpaqueTypedefArithmaticTest, CanAddSubtractAndNegate) {
+TEST(OpaqueTypedefArithmeticTest, CanAddSubtractAndNegate) {
   price p{99.99};
   EXPECT_TRUE((testing::StaticAssertTypeEq<price, decltype(p+p)>()));
   EXPECT_TRUE((testing::StaticAssertTypeEq<price, decltype(p-p)>()));
   EXPECT_TRUE((testing::StaticAssertTypeEq<price, decltype(-p)>()));
 }
 
-TEST(OpaqueTypedefArithmaticTest, PassesThroughToBase) {
+TEST(OpaqueTypedefArithmeticTest, PassesThroughToBase) {
   price p{50.0};
   EXPECT_THAT(p+p, testing::Eq(price(100.0)));
   EXPECT_THAT(p-p, testing::Eq(price(0.0)));