| 27 | string BaseDir() { return io::JoinPath(testing::TmpDir(), "base_dir"); } |
| 28 | |
| 29 | void SetUp() override { |
| 30 | TF_CHECK_OK(env_->CreateDir(BaseDir())); |
| 31 | non_existent_file_ = io::JoinPath(BaseDir(), "non_existent_file.txt"); |
| 32 | actual_file_ = io::JoinPath(BaseDir(), "test_file.txt"); |
| 33 | TF_CHECK_OK(WriteStringToFile(env_, actual_file_, "Some test data")); |
| 34 | |
| 35 | text_graph_def_file_ = io::JoinPath(BaseDir(), "text_graph_def_file.txt"); |
| 36 | binary_graph_def_file_ = |
| 37 | io::JoinPath(BaseDir(), "binary_graph_def_file.txt"); |
| 38 | text_meta_graph_def_file_ = |
| 39 | io::JoinPath(BaseDir(), "text_meta_graph_def_file.txt"); |
| 40 | binary_meta_graph_def_file_ = |
| 41 | io::JoinPath(BaseDir(), "binary_meta_graph_def_file.txt"); |
| 42 | |
| 43 | auto node = graph_def_.add_node(); |
| 44 | node->set_name("foo"); |
| 45 | node->set_op("bar"); |
| 46 | TF_CHECK_OK(WriteTextProto(env_, text_graph_def_file_, graph_def_)); |
| 47 | TF_CHECK_OK(WriteBinaryProto(env_, binary_graph_def_file_, graph_def_)); |
| 48 | *meta_graph_def_.mutable_graph_def() = graph_def_; |
| 49 | TF_CHECK_OK( |
| 50 | WriteTextProto(env_, text_meta_graph_def_file_, meta_graph_def_)); |
| 51 | TF_CHECK_OK( |
| 52 | WriteBinaryProto(env_, binary_meta_graph_def_file_, meta_graph_def_)); |
| 53 | } |
| 54 | |
| 55 | void TearDown() override { |
| 56 | int64 undeleted_files, undeleted_dirs; |
nothing calls this directly
no test coverage detected