diff --git a/unitTests/test_safe_op.cpp b/unitTests/test_safe_op.cpp index 627283b5..7aaeb274 100644 --- a/unitTests/test_safe_op.cpp +++ b/unitTests/test_safe_op.cpp @@ -103,7 +103,7 @@ const bool template void test_add() { - typedef AdditionTestValues TestValues; + using TestValues = AdditionTestValues; #define TEST_ADD(func) \ for (size_t i = 0; i < TestValues::case_count; ++i) { \ @@ -133,7 +133,7 @@ void test_add() template void test_safe_add() { - typedef AdditionTestValues TestValues; + using TestValues = AdditionTestValues; for (size_t i = 0; i < TestValues::case_count; ++i) { for (size_t j = 0; j < TestValues::case_count; ++j) { diff --git a/unitTests/test_slice.cpp b/unitTests/test_slice.cpp index 85427cd5..422e74ee 100644 --- a/unitTests/test_slice.cpp +++ b/unitTests/test_slice.cpp @@ -31,19 +31,19 @@ namespace cpp_98_boilerplate template struct return_type_traits { - typedef T type; + using type = T; }; template struct return_type_traits > { - typedef typename std::vector& type; + using type = typename std::vector&; }; template struct return_type_traits > { - typedef const typename std::vector& type; + using type = const typename std::vector&; }; template @@ -171,7 +171,7 @@ TYPED_TEST_P(slice, constructionFailsWithZeroLength) */ TYPED_TEST_P(slice, subSliceSuccessfulConstruction) { - typedef Slice slice_t; + using slice_t = Slice; // 0 1 2 3 4 5 6 7 8 9 // | | center_vals @@ -244,7 +244,7 @@ void checkSubSlice(const Slice& sl) */ TYPED_TEST_P(slice, constMethodsPreserveConst) { - typedef Slice slice_t; + using slice_t = Slice; // 0 1 2 3 4 5 6 7 8 9 // | | center_vals @@ -263,7 +263,7 @@ TYPED_TEST_P(slice, constMethodsPreserveConst) */ TYPED_TEST_P(mutableSlice, iterators) { - typedef Slice slice_t; + using slice_t = Slice; slice_t sl = this->getTestSlice(); ASSERT_EQ(*sl.begin(), static_cast(1)); @@ -286,7 +286,7 @@ TYPED_TEST_P(mutableSlice, iterators) */ TYPED_TEST_P(mutableSlice, at) { - typedef Slice slice_t; + using slice_t = Slice; slice_t sl = this->getTestSlice(2, 4); sl.at(0) = 6; @@ -421,13 +421,13 @@ REGISTER_TYPED_TEST_CASE_P(slice, atAccess, iteratorAccess, constructionFailsFro subSliceFailedConstruction, subSliceConstructionOverflowResistance, constMethodsPreserveConst); -typedef ::testing::Types, std::vector, int*, const int*> test_types_t; +using test_types_t = ::testing::Types, std::vector, int*, const int*>; INSTANTIATE_TYPED_TEST_CASE_P(slice, slice, test_types_t); REGISTER_TYPED_TEST_CASE_P(mutableSlice, iterators, at); -typedef ::testing::Types, int*> mut_test_types_t; +using mut_test_types_t = ::testing::Types, int*>; INSTANTIATE_TYPED_TEST_CASE_P(slice, mutableSlice, mut_test_types_t); REGISTER_TYPED_TEST_CASE_P(dataBufSlice, successfulConstruction, failedConstruction); -typedef ::testing::Types data_buf_types_t; +using data_buf_types_t = ::testing::Types; INSTANTIATE_TYPED_TEST_CASE_P(slice, dataBufSlice, data_buf_types_t);