Move the C bindings tests to the new location.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2234063002 .

Cr-Mirrored-From: https://github.com/domokit/mojo
Cr-Mirrored-Commit: 843a74ced724286874ca765ff1969f369f447d3a
diff --git a/c/BUILD.gn b/c/BUILD.gn
index 2583fa4..94fc1b6 100644
--- a/c/BUILD.gn
+++ b/c/BUILD.gn
@@ -59,6 +59,36 @@
   ]
 }
 
+mojo_sdk_source_set("bindings_unittests") {
+  testonly = true
+
+  sources = [
+    "tests/bindings/array_unittest.cc",
+    "tests/bindings/buffer_unittest.cc",
+    "tests/bindings/message_unittest.cc",
+    "tests/bindings/struct_unittest.cc",
+    "tests/bindings/testing_util.h",
+    "tests/bindings/union_unittest.cc",
+    "tests/bindings/validation_unittest.cc",
+  ]
+
+  deps = [
+    ":bindings",
+    "//testing/gtest",
+  ]
+
+  mojo_sdk_deps = [
+    "mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
+    "mojo/public/cpp/bindings/tests:validation_util",
+    "mojo/public/cpp/test_support",
+    "mojo/public/cpp/system",
+
+    # The "_c" suffix'd target compiles the generated C bindings to this mojom
+    # target.
+    "mojo/public/interfaces/bindings/tests:test_interfaces_c",
+  ]
+}
+
 # common -----------------------------------------------------------------------
 
 # Headers in include/mojo (to be included as <mojo/HEADER.h>).
diff --git a/c/bindings/tests/BUILD.gn b/c/bindings/tests/BUILD.gn
deleted file mode 100644
index 0f644dc..0000000
--- a/c/bindings/tests/BUILD.gn
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("../../../mojo_sdk.gni")
-
-mojo_sdk_source_set("tests") {
-  testonly = true
-
-  sources = [
-    "array_unittest.cc",
-    "buffer_unittest.cc",
-    "message_unittest.cc",
-    "struct_unittest.cc",
-    "testing_util.h",
-    "union_unittest.cc",
-    "validation_unittest.cc",
-  ]
-
-  deps = [
-    "//testing/gtest",
-  ]
-
-  mojo_sdk_deps = [
-    "mojo/public/c:bindings",
-    "mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
-    "mojo/public/cpp/bindings/tests:validation_util",
-    "mojo/public/cpp/test_support",
-    "mojo/public/cpp/system",
-
-    # The "_c" suffix'd target compiles the generated C bindings to this mojom
-    # target.
-    "mojo/public/interfaces/bindings/tests:test_interfaces_c",
-  ]
-}
diff --git a/c/bindings/tests/array_unittest.cc b/c/tests/bindings/array_unittest.cc
similarity index 99%
rename from c/bindings/tests/array_unittest.cc
rename to c/tests/bindings/array_unittest.cc
index 134cb8e..7ac2494 100644
--- a/c/bindings/tests/array_unittest.cc
+++ b/c/tests/bindings/array_unittest.cc
@@ -9,7 +9,7 @@
 #include <mojo/bindings/struct.h>
 #include <stddef.h>
 
-#include "mojo/public/c/bindings/tests/testing_util.h"
+#include "mojo/public/c/tests/bindings/testing_util.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
diff --git a/c/bindings/tests/buffer_unittest.cc b/c/tests/bindings/buffer_unittest.cc
similarity index 100%
rename from c/bindings/tests/buffer_unittest.cc
rename to c/tests/bindings/buffer_unittest.cc
diff --git a/c/bindings/tests/message_unittest.cc b/c/tests/bindings/message_unittest.cc
similarity index 100%
rename from c/bindings/tests/message_unittest.cc
rename to c/tests/bindings/message_unittest.cc
diff --git a/c/bindings/tests/struct_unittest.cc b/c/tests/bindings/struct_unittest.cc
similarity index 99%
rename from c/bindings/tests/struct_unittest.cc
rename to c/tests/bindings/struct_unittest.cc
index 480586a..33f122d 100644
--- a/c/bindings/tests/struct_unittest.cc
+++ b/c/tests/bindings/struct_unittest.cc
@@ -10,7 +10,7 @@
 #include <mojo/bindings/internal/util.h>
 #include <string.h>
 
-#include "mojo/public/c/bindings/tests/testing_util.h"
+#include "mojo/public/c/tests/bindings/testing_util.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/interfaces/bindings/tests/rect.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
diff --git a/c/bindings/tests/testing_util.h b/c/tests/bindings/testing_util.h
similarity index 90%
rename from c/bindings/tests/testing_util.h
rename to c/tests/bindings/testing_util.h
index 98a38f3..6d276c1 100644
--- a/c/bindings/tests/testing_util.h
+++ b/c/tests/bindings/testing_util.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef MOJO_PUBLIC_C_BINDINGS_TESTS_TESTING_UTIL_H_
-#define MOJO_PUBLIC_C_BINDINGS_TESTS_TESTING_UTIL_H_
+#ifndef MOJO_PUBLIC_C_TESTS_BINDINGS_TESTING_UTIL_H_
+#define MOJO_PUBLIC_C_TESTS_BINDINGS_TESTING_UTIL_H_
 
 #include <mojo/bindings/buffer.h>
 #include <mojo/system/handle.h>
@@ -44,4 +44,4 @@
   decode_fn(in_struct, in_struct_size, NULL, 0);
 }
 
-#endif  // MOJO_PUBLIC_C_BINDINGS_TESTS_TESTING_UTIL_H_
+#endif  // MOJO_PUBLIC_C_TESTS_BINDINGS_TESTING_UTIL_H_
diff --git a/c/bindings/tests/union_unittest.cc b/c/tests/bindings/union_unittest.cc
similarity index 98%
rename from c/bindings/tests/union_unittest.cc
rename to c/tests/bindings/union_unittest.cc
index b2d790f..a434ba8 100644
--- a/c/bindings/tests/union_unittest.cc
+++ b/c/tests/bindings/union_unittest.cc
@@ -8,7 +8,7 @@
 
 #include <mojo/bindings/array.h>
 
-#include "mojo/public/c/bindings/tests/testing_util.h"
+#include "mojo/public/c/tests/bindings/testing_util.h"
 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/c/bindings/tests/validation_unittest.cc b/c/tests/bindings/validation_unittest.cc
similarity index 100%
rename from c/bindings/tests/validation_unittest.cc
rename to c/tests/bindings/validation_unittest.cc