// // Copyright 2015 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // string_utils_unittests: // Unit tests for the string utils. // #include "string_utils.h" #include <gmock/gmock.h> #include <gtest/gtest.h> usingnamespaceangle; namespace { // Basic SplitString tests TEST(StringUtilsTest, SplitString_Basics) { … } // Check different whitespace and result types for SplitString TEST(StringUtilsTest, SplitString_WhitespaceAndResultType) { … } // Tests for SplitStringAlongWhitespace TEST(StringUtilsTest, SplitStringAlongWhitespace) { … } // Tests for TrimString TEST(StringUtilsTest, TrimString) { … } // Basic functionality tests for HexStringToUInt TEST(StringUtilsTest, HexStringToUIntBasic) { … } // Tests for ToCamelCase TEST(StringUtilsTest, ToCamelCase) { … } // Basic functionality for NamesMatchWithWildcard. TEST(StringUtilsTest, NamesMatchWithWildcard) { … } // Note: ReadFileToString is harder to test class BeginsWithTest : public testing::Test { … }; // Test that BeginsWith works correctly for const char * arguments. TEST_F(BeginsWithTest, CharArrays) { … } // Test that BeginsWith works correctly for std::string and const char * arguments. TEST_F(BeginsWithTest, StringAndCharArray) { … } // Test that BeginsWith works correctly for std::string arguments. TEST_F(BeginsWithTest, Strings) { … } class EndsWithTest : public testing::Test { … }; // Test that EndsWith works correctly for const char * arguments. TEST_F(EndsWithTest, CharArrays) { … } // Test that EndsWith works correctly for std::string and const char * arguments. TEST_F(EndsWithTest, StringAndCharArray) { … } // Test that EndsWith works correctly for std::string arguments. TEST_F(EndsWithTest, Strings) { … } } // anonymous namespace