blob: c1b7c746f1a47d3ced0b266b43c2917c517b3553 [file] [log] [blame]
William A. Kennington III953de362022-07-13 17:32:55 -07001#include <stdplus/gtest/tmp.hpp>
2
Patrick Williamsd1984dd2023-05-10 16:12:44 -05003#include <filesystem>
4
5#include <gtest/gtest.h>
6
William A. Kennington III953de362022-07-13 17:32:55 -07007namespace stdplus
8{
9namespace gtest
10{
11
12class TestWithTmpTest : public TestWithTmp
Patrick Williamsd1984dd2023-05-10 16:12:44 -050013{};
William A. Kennington III953de362022-07-13 17:32:55 -070014
15TEST_F(TestWithTmpTest, One)
16{
17 EXPECT_TRUE(std::filesystem::create_directory(
18 std::filesystem::path(CaseTmpDir()) / "a"));
19 EXPECT_TRUE(std::filesystem::create_directory(
20 std::filesystem::path(SuiteTmpDir()) / "a"));
21}
22
23TEST_F(TestWithTmpTest, Two)
24{
25 EXPECT_TRUE(std::filesystem::create_directory(
26 std::filesystem::path(CaseTmpDir()) / "a"));
27 EXPECT_FALSE(std::filesystem::create_directory(
28 std::filesystem::path(SuiteTmpDir()) / "a"));
29}
30
31class TestWithTmpTest2 : public TestWithTmp
Patrick Williamsd1984dd2023-05-10 16:12:44 -050032{};
William A. Kennington III953de362022-07-13 17:32:55 -070033
34TEST_F(TestWithTmpTest2, One)
35{
36 EXPECT_TRUE(std::filesystem::create_directory(
37 std::filesystem::path(SuiteTmpDir()) / "a"));
38 EXPECT_TRUE(std::filesystem::create_directory(
39 std::filesystem::path(CaseTmpDir()) / "a"));
40}
41
42} // namespace gtest
43} // namespace stdplus