mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: These are system headers and so should be included via `<>`. Reviewed By: yfeldblum Differential Revision: D4783480 fbshipit-source-id: 979670b594859b45560cead34f615442dfcc9f8b
15 lines
425 B
C++
15 lines
425 B
C++
#include "caffe2/utils/proto_utils.h"
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace caffe2 {
|
|
|
|
TEST(ProtoUtilsTest, SimpleReadWrite) {
|
|
string content("The quick brown fox jumps over the lazy dog.");
|
|
string name = std::tmpnam(nullptr);
|
|
EXPECT_TRUE(WriteStringToFile(content, name.c_str()));
|
|
string read_back;
|
|
EXPECT_TRUE(ReadStringFromFile(name.c_str(), &read_back));
|
|
EXPECT_EQ(content, read_back);
|
|
}
|
|
|
|
} // namespace caffe2
|