fix warning tmpnam
This commit is contained in:
@@ -35,3 +35,4 @@ pip_test(math)
|
||||
pip_test(core)
|
||||
pip_test(piobject)
|
||||
pip_test(client_server pip_client_server)
|
||||
pip_test(io)
|
||||
|
||||
14
tests/io/testpifile.cpp
Normal file
14
tests/io/testpifile.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "pifile.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(PIFile_Test, openTemporary) {
|
||||
const auto ba = PIByteArray::fromHex("AABBCC");
|
||||
PIFile f;
|
||||
ASSERT_TRUE(f.openTemporary());
|
||||
ASSERT_TRUE(f.path().isNotEmpty());
|
||||
ASSERT_EQ(ba.size(), f.write(ba));
|
||||
ASSERT_EQ(ba, f.readAll());
|
||||
ASSERT_TRUE(f.close());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user