aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/framework
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-01-02 10:45:56 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-02 10:49:13 -0800
commit040b4cbce7084b8340e075af4797f81359c2bbf4 (patch)
tree7252f01b8bbcc5950e90a529ee0fb11328e6acde /tensorflow/cc/framework
parent127c98b9e3ed3b79284c5f16046071aa4ac2e7cb (diff)
Remove using directives. Test appertaining to ops have been moved into namespace tensorflow::ops; all other tests now use explicit using-declarations.
Some tests are now using unnamed namespaces more aggressively to make as many names internal as possible. PiperOrigin-RevId: 180564422
Diffstat (limited to 'tensorflow/cc/framework')
-rw-r--r--tensorflow/cc/framework/cc_ops_test.cc7
-rw-r--r--tensorflow/cc/framework/gradient_checker_test.cc12
-rw-r--r--tensorflow/cc/framework/gradients_test.cc14
3 files changed, 25 insertions, 8 deletions
diff --git a/tensorflow/cc/framework/cc_ops_test.cc b/tensorflow/cc/framework/cc_ops_test.cc
index 5da23036ea..ac05e3cf95 100644
--- a/tensorflow/cc/framework/cc_ops_test.cc
+++ b/tensorflow/cc/framework/cc_ops_test.cc
@@ -22,8 +22,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
namespace tensorflow {
-using namespace ops; // NOLINT(build/namespaces)
-
+namespace ops {
namespace {
Output Linear(const Scope& scope, Input x, Input w, Input b) {
@@ -39,8 +38,6 @@ void GetColocationConstraints(const Output& tensor,
constraints));
}
-} // namespace
-
TEST(CCOpTest, Basic) {
Scope root = Scope::NewRootScope();
auto c = Const(root, {{1, 1}});
@@ -249,4 +246,6 @@ TEST(CCOpTest, InvalidFinalize) {
string::npos);
}
+} // namespace
+} // namespace ops
} // namespace tensorflow
diff --git a/tensorflow/cc/framework/gradient_checker_test.cc b/tensorflow/cc/framework/gradient_checker_test.cc
index fdc457f40a..d4f0a7f5ab 100644
--- a/tensorflow/cc/framework/gradient_checker_test.cc
+++ b/tensorflow/cc/framework/gradient_checker_test.cc
@@ -24,10 +24,18 @@ limitations under the License.
#include "tensorflow/core/util/equal_graph_def.h"
namespace tensorflow {
-using namespace ops; // NOLINT(build/namespaces)
-
namespace {
+using ops::Complex;
+using ops::Const;
+using ops::MatMul;
+using ops::Placeholder;
+using ops::Real;
+using ops::Split;
+using ops::Square;
+using ops::Stack;
+using ops::Unstack;
+
TEST(GradientCheckerTest, BasicFloat) {
Scope scope = Scope::NewRootScope();
TensorShape shape({2, 4, 3});
diff --git a/tensorflow/cc/framework/gradients_test.cc b/tensorflow/cc/framework/gradients_test.cc
index 07a062e704..26e3170ad8 100644
--- a/tensorflow/cc/framework/gradients_test.cc
+++ b/tensorflow/cc/framework/gradients_test.cc
@@ -26,10 +26,20 @@ limitations under the License.
#include "tensorflow/core/util/equal_graph_def.h"
namespace tensorflow {
-using namespace ops; // NOLINT(build/namespaces)
-
namespace {
+using ops::Assign;
+using ops::Const;
+using ops::Identity;
+using ops::MatMul;
+using ops::OnesLike;
+using ops::Placeholder;
+using ops::Square;
+using ops::Stack;
+using ops::StopGradient;
+using ops::Unstack;
+using ops::Variable;
+
// TODO(andydavis) Add more unit tests once more gradient functions are ported.
class GradientsTest : public ::testing::Test {
protected: