Benign repos Download

file_utils_test.cc

Google Test frameworkimports tensorflow/core/platform/test.h
SHA-2568331de878be299897d5563db82a5e6c430d7da5d0ac328049f258703bdeb2d6a

Evidence

apache web server name lines 1–10
1/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
imports tensorflow/core/platform/test.h lines 11–31
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tensorflow/tools/graph_transforms/file_utils.h"
17#include "tensorflow/cc/ops/const_op.h"
18#include "tensorflow/cc/ops/image_ops.h"
19#include "tensorflow/cc/ops/nn_ops.h"
20#include "tensorflow/cc/ops/standard_ops.h"
21#include "tensorflow/core/framework/tensor_testutil.h"
22#include "tensorflow/core/lib/core/status_test_util.h"
23#include "tensorflow/core/lib/io/path.h"
24#include "tensorflow/core/platform/test.h"
25#include "tensorflow/core/platform/test_benchmark.h"
26#include "tensorflow/core/util/equal_graph_def.h"
27
28namespace tensorflow {
29namespace graph_transforms {
30
31class FileUtilsTest : public ::testing: …
C/C++ unit-test EXPECT_TRUE marker lines 52–64
52:35…
53 io::JoinPath(testing::TmpDir(), "bogus_graph.pb");
54 TF_ASSERT_OK(
55 WriteStringToFile(Env::Default(), bogus_file, "Not a !{ proto..."));
56
57 GraphDef text_graph_def;
58 TF_EXPECT_OK(LoadTextOrBinaryGraphFile(text_file, &text_graph_def));
59 std::string text_diff;
60 EXPECT_TRUE(EqualGraphDef(text_graph_def, graph_def, &text_diff))
61 << text_diff;
62
63 GraphDef binary_graph_def;
64 TF_EXPECT_OK(Lo …
TEST_F macro lines 75–84
75:25… tOrBinaryGraphFile(bogus_file, &bogus_graph_def).ok());
76 }
77};
78
79TEST_F(FileUtilsTest, TestLoadTextOrBinaryGraphFile) {
80 TestLoadTextOrBinaryGraphFile();
81}
82
83} // namespace graph_transforms
84} // na …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.