test/nextgen/main.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // SPDX-FileCopyrightText: Copyright 2025-2026 Arm Limited and/or its affiliates <open-source-office@arm.com> | ||
| 3 | // | ||
| 4 | // SPDX-License-Identifier: Apache-2.0 | ||
| 5 | // | ||
| 6 | |||
| 7 | #include <gtest/gtest.h> | ||
| 8 | |||
| 9 | #include <iostream> | ||
| 10 | #include <memory> | ||
| 11 | |||
| 12 | #include "test/nextgen/common/test_registry.hpp" | ||
| 13 | |||
| 14 | namespace { | ||
| 15 | |||
| 16 | class TestSummaryListener final : public ::testing::EmptyTestEventListener { | ||
| 17 | 3 | void OnTestProgramEnd(const testing::UnitTest& unit_test) override { | |
| 18 | 3 | std::cout << "Test seed = " << unit_test.random_seed() << "\n"; | |
| 19 | 3 | } | |
| 20 | }; | ||
| 21 | |||
| 22 | } // namespace | ||
| 23 | |||
| 24 | 3 | int main(int argc, char** argv) { | |
| 25 | 3 | testing::InitGoogleTest(&argc, argv); | |
| 26 | |||
| 27 | 3 | auto& listeners = ::testing::UnitTest::GetInstance()->listeners(); | |
| 28 | 3 | auto summary_listener = std::make_unique<TestSummaryListener>(); | |
| 29 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | listeners.Append(summary_listener.release()); |
| 30 | |||
| 31 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | kai::test::TestRegistry::init(); |
| 32 | |||
| 33 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | return RUN_ALL_TESTS(); |
| 34 | 3 | } | |
| 35 |