Compare commits

...

7 Commits

Author SHA1 Message Date
Srikanth Patchava
63bbf290eb
Merge 886750f05d8e6420eddac1af1374aa9128391632 into 3ff51c3e80f2c2eb105d43ecb9acab9a62e01600 2026-07-29 18:02:44 +01:00
Copybara-Service
3ff51c3e80 Merge pull request #5041 from alvinjaison:fix/get-test-suite-shuffle-index
PiperOrigin-RevId: 955317170
Change-Id: I40e01cdafe58768ccdb743dcf38717e48edcde41
2026-07-28 09:58:12 -07:00
Abseil Team
c6f04243ed Automated Code Change
PiperOrigin-RevId: 955021426
Change-Id: I3ab06e960011d1d0cd44ea00595a5067aaa7f30b
2026-07-27 22:07:28 -07:00
Abseil Team
af4c3cfcb3 Automated Code Change
PiperOrigin-RevId: 955017590
Change-Id: I5125f56376603462fb63796fec1fbc50fd4d935f
2026-07-27 21:57:20 -07:00
Abseil Team
ecb18f0b03 Automated Code Change
PiperOrigin-RevId: 955003621
Change-Id: I83518a7f947d9f7d9b89fe14e1219d32bcdc95a3
2026-07-27 21:17:32 -07:00
Alvin Jaison
1269db9643 Fix GetTestSuite(i) ignoring shuffle order UnitTestImpl::GetTestSuite(int i) computes the shuffled index from test_suite_indices_ but then accesses test_suites_ using the raw parameter 'i' instead of the computed 'index'. This causes the public API UnitTest::GetTestSuite(i) to return test suites in original registration order rather than the active shuffle order. The mutable variant GetMutableSuiteCase(i) correctly uses 'index', and the equivalent function TestSuite::GetTestInfo(i) also uses 'index'. This was a copy-paste typo introduced in commit bd851333 (Sep 2009) when the shuffle feature was first added. The bug is observable from within TestEventListener callbacks during test execution when --gtest_shuffle is active. 2026-07-24 16:11:55 +01:00
Srikanth Patchava
886750f05d
chore: add .editorconfig and .gitattributes
Squashed into a single commit authored with srpatcha@users.noreply.github.com
to satisfy the Google CLA bot, which requires every commit author on a PR
to be covered by a signed CLA.

Signed-off-by: Srikanth Patchava <srpatcha@users.noreply.github.com>
2026-05-16 09:29:53 -07:00
38 changed files with 526 additions and 16 deletions

21
.editorconfig Normal file
View File

@ -0,0 +1,21 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[*.{c,h,cpp,hpp}]
indent_style = space
indent_size = 4
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab

24
.gitattributes vendored Normal file
View File

@ -0,0 +1,24 @@
# Auto detect text files and perform LF normalization
* text=auto
# Explicitly declare text files
*.md text diff=markdown
*.txt text
*.csv text
*.yml text
*.yaml text
*.json text
*.xml text
*.html text diff=html
*.css text diff=css
# Denote binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
*.zip binary
*.gz binary
*.tar binary

0
googlemock/test/gmock_leak_test.py Executable file → Normal file
View File

0
googlemock/test/gmock_output_test.py Executable file → Normal file
View File

View File

@ -30,6 +30,8 @@
// Tests that Google Mock constructs can be used in a large number of
// threads concurrently.
#include <iterator>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
@ -188,7 +190,7 @@ TEST(StressTest, CanUseGMockWithThreads) {
&TestPartiallyOrderedExpectationsWithThreads,
};
const int kRoutines = sizeof(test_routines) / sizeof(test_routines[0]);
const int kRoutines = std::size(test_routines);
const int kCopiesOfEachRoutine = kMaxTestThreads / kRoutines;
const int kTestThreads = kCopiesOfEachRoutine * kRoutines;
ThreadWithParam<Dummy>* threads[kTestThreads] = {};

0
googlemock/test/gmock_test_utils.py Executable file → Normal file
View File

View File

@ -0,0 +1,327 @@
// Copyright 2024 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Sample #11 - Advanced parameterized testing with combined type and value
// parameters, custom name generators, and fixture lifecycle demonstration.
//
// This sample demonstrates:
// 1. Type-parameterized tests for generic containers
// 2. Value-parameterized tests with custom name generators
// 3. Fixture lifecycle (SetUp/TearDown ordering)
// 4. Multiple parameter combinations using Combine, Values, Range
// 5. INSTANTIATE_TEST_SUITE_P with various generators
#include "sample11_parameterized_fixture.h"
#include <iostream>
#include <string>
#include <tuple>
#include <vector>
#include "gtest/gtest.h"
// ---------------------------------------------------------------------------
// Part 1: Type-parameterized tests for SortedContainer<T>
// ---------------------------------------------------------------------------
template <typename T>
class SortedContainerTest : public ::testing::Test {
protected:
void SetUp() override {
// Track lifecycle
setup_called_ = true;
}
void TearDown() override {
container_.Clear();
teardown_called_ = true;
}
SortedContainer<T> container_;
bool setup_called_ = false;
bool teardown_called_ = false;
};
using ContainerTypes = ::testing::Types<int, double, std::string>;
TYPED_TEST_SUITE(SortedContainerTest, ContainerTypes);
// Helper to create a test value for each type
template <typename T>
T MakeValue(int n);
template <>
int MakeValue<int>(int n) {
return n * 10;
}
template <>
double MakeValue<double>(int n) {
return n * 1.5;
}
template <>
std::string MakeValue<std::string>(int n) {
return "item_" + std::to_string(n);
}
TYPED_TEST(SortedContainerTest, InsertMaintainsSortOrder) {
ASSERT_TRUE(this->setup_called_);
// Insert in reverse order
for (int i = 5; i >= 1; --i) {
this->container_.Insert(MakeValue<TypeParam>(i));
}
EXPECT_EQ(this->container_.Size(), 5u);
// Verify sorted order
auto all = this->container_.GetAll();
for (size_t i = 1; i < all.size(); ++i) {
EXPECT_LE(all[i - 1], all[i]) << "Elements not sorted at index " << i;
}
}
TYPED_TEST(SortedContainerTest, ContainsFindsInsertedElements) {
for (int i = 1; i <= 3; ++i) {
this->container_.Insert(MakeValue<TypeParam>(i));
}
for (int i = 1; i <= 3; ++i) {
EXPECT_TRUE(this->container_.Contains(MakeValue<TypeParam>(i)));
}
EXPECT_FALSE(this->container_.Contains(MakeValue<TypeParam>(99)));
}
TYPED_TEST(SortedContainerTest, RemoveDeletesElement) {
this->container_.Insert(MakeValue<TypeParam>(1));
this->container_.Insert(MakeValue<TypeParam>(2));
this->container_.Insert(MakeValue<TypeParam>(3));
EXPECT_TRUE(this->container_.Remove(MakeValue<TypeParam>(2)));
EXPECT_EQ(this->container_.Size(), 2u);
EXPECT_FALSE(this->container_.Contains(MakeValue<TypeParam>(2)));
EXPECT_TRUE(this->container_.Contains(MakeValue<TypeParam>(1)));
EXPECT_TRUE(this->container_.Contains(MakeValue<TypeParam>(3)));
}
TYPED_TEST(SortedContainerTest, EmptyContainerBehavior) {
EXPECT_TRUE(this->container_.Empty());
EXPECT_EQ(this->container_.Size(), 0u);
EXPECT_FALSE(this->container_.Remove(MakeValue<TypeParam>(1)));
}
// ---------------------------------------------------------------------------
// Part 2: Value-parameterized tests for StatsCalculator
// ---------------------------------------------------------------------------
struct StatsTestData {
std::string name;
std::vector<double> data;
double expected_mean;
double expected_median;
double tolerance;
};
class StatsCalculatorTest : public ::testing::TestWithParam<StatsTestData> {
protected:
void SetUp() override { calc_ = StatsCalculator(6); }
void TearDown() override {
// Lifecycle demonstration: TearDown called after each test
}
StatsCalculator calc_;
};
// Custom name generator for readable test names
struct StatsTestNameGenerator {
std::string operator()(
const ::testing::TestParamInfo<StatsTestData>& info) const {
return info.param.name;
}
};
TEST_P(StatsCalculatorTest, MeanCalculation) {
const auto& param = GetParam();
double result = calc_.Mean(param.data);
EXPECT_NEAR(result, param.expected_mean, param.tolerance)
<< "Mean calculation failed for dataset: " << param.name;
}
TEST_P(StatsCalculatorTest, MedianCalculation) {
const auto& param = GetParam();
double result = calc_.Median(param.data);
EXPECT_NEAR(result, param.expected_median, param.tolerance)
<< "Median calculation failed for dataset: " << param.name;
}
TEST_P(StatsCalculatorTest, VarianceIsNonNegative) {
const auto& param = GetParam();
double variance = calc_.Variance(param.data);
EXPECT_GE(variance, 0.0) << "Variance should be non-negative";
}
TEST_P(StatsCalculatorTest, StdDevMatchesSqrtVariance) {
const auto& param = GetParam();
double variance = calc_.Variance(param.data);
double stddev = calc_.StandardDeviation(param.data);
EXPECT_NEAR(stddev, std::sqrt(variance), param.tolerance);
}
INSTANTIATE_TEST_SUITE_P(
BasicDatasets, StatsCalculatorTest,
::testing::Values(
StatsTestData{"Uniform", {1.0, 2.0, 3.0, 4.0, 5.0}, 3.0, 3.0, 1e-6},
StatsTestData{"SingleElement", {42.0}, 42.0, 42.0, 1e-6},
StatsTestData{"TwoElements", {10.0, 20.0}, 15.0, 15.0, 1e-6},
StatsTestData{"Negative", {-5.0, -3.0, -1.0, 0.0, 2.0}, -1.4, -1.0,
1e-6},
StatsTestData{"LargeValues", {1e6, 2e6, 3e6}, 2e6, 2e6, 1.0}),
StatsTestNameGenerator());
// ---------------------------------------------------------------------------
// Part 3: Combined parameter tests with Combine and tuple parameters
// ---------------------------------------------------------------------------
class CombinedParamTest
: public ::testing::TestWithParam<std::tuple<int, bool, std::string>> {
protected:
void SetUp() override {
iterations_ = std::get<0>(GetParam());
verbose_ = std::get<1>(GetParam());
mode_ = std::get<2>(GetParam());
}
int iterations_;
bool verbose_;
std::string mode_;
};
// Custom name generator for combined parameters
struct CombinedTestNameGenerator {
std::string operator()(
const ::testing::TestParamInfo<
std::tuple<int, bool, std::string>>& info) const {
std::ostringstream oss;
oss << "Iter" << std::get<0>(info.param) << "_"
<< (std::get<1>(info.param) ? "Verbose" : "Quiet") << "_"
<< std::get<2>(info.param);
return oss.str();
}
};
TEST_P(CombinedParamTest, IterationsArePositive) {
EXPECT_GT(iterations_, 0) << "Iterations must be positive";
}
TEST_P(CombinedParamTest, ModeIsValid) {
EXPECT_TRUE(mode_ == "fast" || mode_ == "balanced" || mode_ == "thorough")
<< "Unknown mode: " << mode_;
}
TEST_P(CombinedParamTest, ParameterCombinationWorks) {
// Verify that each parameter combination produces a valid configuration
TestConfig config(mode_, iterations_, verbose_, 0.001);
EXPECT_EQ(config.iterations, iterations_);
EXPECT_EQ(config.verbose, verbose_);
EXPECT_EQ(config.name, mode_);
EXPECT_DOUBLE_EQ(config.tolerance, 0.001);
}
INSTANTIATE_TEST_SUITE_P(
AllCombinations, CombinedParamTest,
::testing::Combine(::testing::Values(1, 5, 10),
::testing::Bool(),
::testing::Values("fast", "balanced", "thorough")),
CombinedTestNameGenerator());
// ---------------------------------------------------------------------------
// Part 4: Range-based parameterized tests
// ---------------------------------------------------------------------------
class RangeParamTest : public ::testing::TestWithParam<int> {
protected:
void SetUp() override {
value_ = GetParam();
container_.Clear();
}
void TearDown() override { container_.Clear(); }
int value_;
SortedContainer<int> container_;
};
TEST_P(RangeParamTest, InsertNElementsMaintainsCount) {
for (int i = 0; i < value_; ++i) {
container_.Insert(i * 7); // Non-sequential values
}
EXPECT_EQ(container_.Size(), static_cast<size_t>(value_));
}
TEST_P(RangeParamTest, InsertNElementsMaintainsOrder) {
// Insert in reverse order
for (int i = value_ - 1; i >= 0; --i) {
container_.Insert(i);
}
auto all = container_.GetAll();
for (int i = 0; i < value_; ++i) {
EXPECT_EQ(all[i], i);
}
}
struct RangeTestNameGenerator {
std::string operator()(const ::testing::TestParamInfo<int>& info) const {
return "Count_" + std::to_string(info.param);
}
};
INSTANTIATE_TEST_SUITE_P(SmallRange, RangeParamTest,
::testing::Range(1, 8),
RangeTestNameGenerator());
INSTANTIATE_TEST_SUITE_P(LargeRange, RangeParamTest,
::testing::Values(50, 100, 500),
RangeTestNameGenerator());
// ---------------------------------------------------------------------------
// Part 5: Fixture lifecycle demonstration
// ---------------------------------------------------------------------------
class LifecycleTest : public ::testing::Test {
protected:
static void SetUpTestSuite() { suite_setup_count_++; }
static void TearDownTestSuite() { suite_teardown_count_++; }
void SetUp() override { instance_setup_count_++; }
void TearDown() override { instance_teardown_count_++; }
static int suite_setup_count_;
static int suite_teardown_count_;
static int instance_setup_count_;
static int instance_teardown_count_;
};
int LifecycleTest::suite_setup_count_ = 0;
int LifecycleTest::suite_teardown_count_ = 0;
int LifecycleTest::instance_setup_count_ = 0;
int LifecycleTest::instance_teardown_count_ = 0;
TEST_F(LifecycleTest, SuiteSetUpCalledOnce) {
EXPECT_EQ(suite_setup_count_, 1)
<< "SetUpTestSuite should be called exactly once before all tests";
}
TEST_F(LifecycleTest, InstanceSetUpCalledPerTest) {
EXPECT_GE(instance_setup_count_, 1)
<< "SetUp should be called at least once";
EXPECT_EQ(instance_setup_count_, instance_teardown_count_ + 1)
<< "SetUp count should be one more than TearDown count during a test";
}

View File

@ -0,0 +1,127 @@
// Copyright 2024 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Sample #11 - Advanced parameterized testing with combined type and value
// parameters, custom name generators, and fixture lifecycle demonstration.
#ifndef GOOGLETEST_SAMPLES_SAMPLE11_PARAMETERIZED_FIXTURE_H_
#define GOOGLETEST_SAMPLES_SAMPLE11_PARAMETERIZED_FIXTURE_H_
#include <algorithm>
#include <cmath>
#include <functional>
#include <map>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>
// A simple container that supports different storage strategies.
// This is the class under test for our type-parameterized tests.
template <typename T>
class SortedContainer {
public:
void Insert(const T& value) {
auto it = std::lower_bound(data_.begin(), data_.end(), value);
data_.insert(it, value);
}
bool Contains(const T& value) const {
return std::binary_search(data_.begin(), data_.end(), value);
}
size_t Size() const { return data_.size(); }
bool Empty() const { return data_.empty(); }
const T& At(size_t index) const { return data_.at(index); }
void Clear() { data_.clear(); }
// Returns elements in sorted order
std::vector<T> GetAll() const { return data_; }
// Remove first occurrence of value
bool Remove(const T& value) {
auto it = std::lower_bound(data_.begin(), data_.end(), value);
if (it != data_.end() && *it == value) {
data_.erase(it);
return true;
}
return false;
}
private:
std::vector<T> data_;
};
// A numeric statistics calculator for value-parameterized tests
class StatsCalculator {
public:
explicit StatsCalculator(int precision = 6) : precision_(precision) {}
double Mean(const std::vector<double>& data) const {
if (data.empty()) return 0.0;
double sum = std::accumulate(data.begin(), data.end(), 0.0);
return RoundToPrecision(sum / static_cast<double>(data.size()));
}
double Variance(const std::vector<double>& data) const {
if (data.size() < 2) return 0.0;
double m = Mean(data);
double sumSq = 0.0;
for (const auto& v : data) {
double diff = v - m;
sumSq += diff * diff;
}
return RoundToPrecision(sumSq / static_cast<double>(data.size() - 1));
}
double StandardDeviation(const std::vector<double>& data) const {
return RoundToPrecision(std::sqrt(Variance(data)));
}
double Median(std::vector<double> data) const {
if (data.empty()) return 0.0;
std::sort(data.begin(), data.end());
size_t mid = data.size() / 2;
if (data.size() % 2 == 0) {
return RoundToPrecision((data[mid - 1] + data[mid]) / 2.0);
}
return data[mid];
}
int GetPrecision() const { return precision_; }
private:
double RoundToPrecision(double value) const {
double factor = std::pow(10.0, precision_);
return std::round(value * factor) / factor;
}
int precision_;
};
// Configuration struct for parameterized tests
struct TestConfig {
std::string name;
int iterations;
bool verbose;
double tolerance;
TestConfig(const std::string& n, int iter, bool v, double tol)
: name(n), iterations(iter), verbose(v), tolerance(tol) {}
};
#endif // GOOGLETEST_SAMPLES_SAMPLE11_PARAMETERIZED_FIXTURE_H_

View File

@ -39,6 +39,8 @@
#include "sample2.h"
#include <iterator>
#include "gtest/gtest.h"
namespace {
// In this example, we test the MyString class (a simple string).
@ -78,7 +80,7 @@ const char kHelloString[] = "Hello, world!";
TEST(MyString, ConstructorFromCString) {
const MyString s(kHelloString);
EXPECT_EQ(0, strcmp(s.c_string(), kHelloString));
EXPECT_EQ(sizeof(kHelloString) / sizeof(kHelloString[0]) - 1, s.Length());
EXPECT_EQ(std::size(kHelloString) - 1, s.Length());
}
// Tests the copy c'tor.

View File

@ -587,7 +587,7 @@ class GTEST_API_ UnitTestImpl {
// total_test_suite_count() - 1. If i is not in that range, returns NULL.
const TestSuite* GetTestSuite(int i) const {
const int index = GetElementOr(test_suite_indices_, i, -1);
return index < 0 ? nullptr : test_suites_[static_cast<size_t>(i)];
return index < 0 ? nullptr : test_suites_[static_cast<size_t>(index)];
}
// Legacy API is deprecated but still available

View File

@ -1260,7 +1260,11 @@ std::string GetCapturedStderr() {
size_t GetFileSize(FILE* file) {
fseek(file, 0, SEEK_END);
return static_cast<size_t>(ftell(file));
const long size = ftell(file);
if (size < 0) {
return 0;
}
return static_cast<size_t>(size);
}
std::string ReadEntireFile(FILE* file) {

View File

@ -3895,7 +3895,9 @@ TestEventRepeater::~TestEventRepeater() {
}
void TestEventRepeater::Append(TestEventListener* listener) {
if (listener != nullptr) {
listeners_.push_back(listener);
}
}
TestEventListener* TestEventRepeater::Release(TestEventListener* listener) {

View File

0
googletest/test/googletest-catch-exceptions-test.py Executable file → Normal file
View File

0
googletest/test/googletest-color-test.py Executable file → Normal file
View File

0
googletest/test/googletest-env-var-test.py Executable file → Normal file
View File

View File

0
googletest/test/googletest-failfast-unittest.py Executable file → Normal file
View File

0
googletest/test/googletest-filter-unittest.py Executable file → Normal file
View File

0
googletest/test/googletest-list-tests-unittest.py Executable file → Normal file
View File

View File

@ -32,6 +32,7 @@
// This file verifies Google Test event listeners receive events at the
// right times.
#include <iterator>
#include <string>
#include <vector>
@ -498,8 +499,7 @@ int main(int argc, char** argv) {
"1st.OnTestProgramEnd"};
#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
VerifyResults(events, expected_events,
sizeof(expected_events) / sizeof(expected_events[0]));
VerifyResults(events, expected_events, std::size(expected_events));
// We need to check manually for ad hoc test failures that happen after
// RUN_ALL_TESTS finishes.

0
googletest/test/googletest-output-test.py Executable file → Normal file
View File

View File

@ -36,6 +36,7 @@
#include <stdlib.h>
#include <algorithm>
#include <iterator>
#include <string>
#include "gtest/gtest-spi.h"
@ -149,7 +150,7 @@ TEST(LoggingTest, InterleavingLoggingAndAssertions) {
static const int a[4] = {3, 9, 2, 6};
printf("(expecting 2 failures on (3) >= (a[i]))\n");
for (int i = 0; i < static_cast<int>(sizeof(a) / sizeof(*a)); i++) {
for (int i = 0; i < static_cast<int>(std::size(a)); i++) {
printf("i == %d\n", i);
EXPECT_GE(3, a[i]);
}

View File

@ -39,6 +39,7 @@
#include <cstdint>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <set>
#include <sstream>
@ -737,10 +738,7 @@ const int test_generation_params[] = {36, 42, 72};
class TestGenerationTest : public TestWithParam<int> {
public:
enum {
PARAMETER_COUNT =
sizeof(test_generation_params) / sizeof(test_generation_params[0])
};
enum { PARAMETER_COUNT = std::size(test_generation_params) };
typedef TestGenerationEnvironment<PARAMETER_COUNT> Environment;

View File

@ -39,6 +39,7 @@
#include <deque>
#include <forward_list>
#include <functional>
#include <iterator>
#include <limits>
#include <list>
#include <map>
@ -1784,7 +1785,7 @@ TEST(IsValidUTF8Test, IllFormedUTF8) {
// too.
{"\xEE\x80\x80", "\"\\xEE\\x80\\x80\"\n As Text: \"\""}};
for (int i = 0; i < int(sizeof(kTestdata) / sizeof(kTestdata[0])); ++i) {
for (int i = 0; i < int(std::size(kTestdata)); ++i) {
EXPECT_PRINT_TO_STRING_(kTestdata[i][0], kTestdata[i][1]);
}
}

0
googletest/test/googletest-setuptestsuite-test.py Executable file → Normal file
View File

0
googletest/test/googletest-shuffle-test.py Executable file → Normal file
View File

0
googletest/test/googletest-throw-on-failure-test.py Executable file → Normal file
View File

0
googletest/test/googletest-uninitialized-test.py Executable file → Normal file
View File

0
googletest/test/gtest_help_test.py Executable file → Normal file
View File

0
googletest/test/gtest_skip_check_output_test.py Executable file → Normal file
View File

View File

0
googletest/test/gtest_test_utils.py Executable file → Normal file
View File

0
googletest/test/gtest_testbridge_test.py Executable file → Normal file
View File

View File

@ -33,6 +33,8 @@
#include "gtest/gtest.h"
#include <iterator>
// Verifies that the command line flag variables can be accessed in
// code once "gtest.h" has been #included.
// Do not move it after other gtest #includes.
@ -5853,9 +5855,8 @@ class ParseFlagsTest : public Test {
// to specify the array sizes.
#define GTEST_TEST_PARSING_FLAGS_(argv1, argv2, expected, should_print_help) \
TestParsingFlags(sizeof(argv1) / sizeof(*argv1) - 1, argv1, \
sizeof(argv2) / sizeof(*argv2) - 1, argv2, expected, \
should_print_help)
TestParsingFlags(std::size(argv1) - 1, argv1, std::size(argv2) - 1, argv2, \
expected, should_print_help)
};
// Tests parsing an empty command line.

0
googletest/test/gtest_xml_outfiles_test.py Executable file → Normal file
View File

0
googletest/test/gtest_xml_output_unittest.py Executable file → Normal file
View File

0
googletest/test/gtest_xml_test_utils.py Executable file → Normal file
View File