summaryrefslogtreecommitdiffhomepage
path: root/tests/test-tempfile.cpp
blob: 782c3dee7ae7102e992629be0215c5a8353646ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <gtest/gtest.h>

#include "tempfile.h"

class TempfileTest: public ::testing::Test
{
protected:
 TempfileTest(){
 }

 ~TempfileTest() override{
 }

 void SetUp() override
 {
 }

 void TearDown() override
 {
 }

};

TEST_F(TempfileTest, getPath)
{
 Reichwein::Tempfile t0;
 Reichwein::Tempfile t1{".cpp"};
 Reichwein::Tempfile t2{".cpp"};

 EXPECT_NE(t0.getPath(), t1.getPath());
 EXPECT_NE(t1.getPath(), t2.getPath());

 EXPECT_GT(t0.getPath().generic_u8string().size(), 0);
 EXPECT_GT(t1.getPath().generic_u8string().size(), 4);
 EXPECT_GT(t2.getPath().generic_u8string().size(), 4);
}