25 lines
552 B
C++
25 lines
552 B
C++
#pragma once
|
|
|
|
#include <gtest/gtest.h>
|
|
#include <string>
|
|
#include <filesystem>
|
|
|
|
#ifndef TEST_CONFIG_PATH
|
|
#define TEST_CONFIG_PATH "../pipeline/configs/pipeline.yaml"
|
|
#endif
|
|
|
|
namespace pipeline {
|
|
namespace test {
|
|
|
|
class TestBase : public ::testing::Test {
|
|
protected:
|
|
const std::string config_path = TEST_CONFIG_PATH;
|
|
|
|
void SetUp() override {
|
|
// 确保pipeline.yaml存在
|
|
ASSERT_TRUE(std::filesystem::exists(config_path)) << "pipeline.yaml not found at: " << config_path;
|
|
}
|
|
};
|
|
|
|
} // namespace test
|
|
} // namespace pipeline
|