Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Unified Diff: mojo/public/cpp/bindings/tests/union_unittest.cc

Issue 1397133002: Remove callers of mojo::Array<size_t> constructor in favor of ::New (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/tests/union_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/union_unittest.cc b/mojo/public/cpp/bindings/tests/union_unittest.cc
index 261b0ee43b63b152a59bfab35b03ce5f801d142c..5825f09e2bd1dcb828764845e923415f6962caf9 100644
--- a/mojo/public/cpp/bindings/tests/union_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/union_unittest.cc
@@ -383,7 +383,7 @@ TEST(UnionTest, StringValidateOOB) {
// Array tests
TEST(UnionTest, PodUnionInArray) {
SmallStructPtr small_struct(SmallStruct::New());
- small_struct->pod_union_array = Array<PodUnionPtr>(2);
+ small_struct->pod_union_array = Array<PodUnionPtr>::New(2);
small_struct->pod_union_array[0] = PodUnion::New();
small_struct->pod_union_array[1] = PodUnion::New();
@@ -396,7 +396,7 @@ TEST(UnionTest, PodUnionInArray) {
TEST(UnionTest, PodUnionInArraySerialization) {
Environment environment;
- Array<PodUnionPtr> array(2);
+ auto array = Array<PodUnionPtr>::New(2);
array[0] = PodUnion::New();
array[1] = PodUnion::New();
@@ -423,7 +423,7 @@ TEST(UnionTest, PodUnionInArraySerialization) {
TEST(UnionTest, PodUnionInArrayValidation) {
Environment environment;
- Array<PodUnionPtr> array(2);
+ auto array = Array<PodUnionPtr>::New(2);
array[0] = PodUnion::New();
array[1] = PodUnion::New();
@@ -447,7 +447,7 @@ TEST(UnionTest, PodUnionInArrayValidation) {
}
TEST(UnionTest, PodUnionInArraySerializationWithNull) {
Environment environment;
- Array<PodUnionPtr> array(2);
+ auto array = Array<PodUnionPtr>::New(2);
array[0] = PodUnion::New();
array[0]->set_f_int8(10);
@@ -769,7 +769,7 @@ TEST(UnionTest, StructInUnionValidationNullable) {
TEST(UnionTest, ArrayInUnionGetterSetter) {
Environment environment;
- Array<int8_t> array(2);
+ auto array = Array<int8_t>::New(2);
array[0] = 8;
array[1] = 9;
@@ -783,7 +783,7 @@ TEST(UnionTest, ArrayInUnionGetterSetter) {
TEST(UnionTest, ArrayInUnionSerialization) {
Environment environment;
- Array<int8_t> array(2);
+ auto array = Array<int8_t>::New(2);
array[0] = 8;
array[1] = 9;
@@ -811,7 +811,7 @@ TEST(UnionTest, ArrayInUnionSerialization) {
TEST(UnionTest, ArrayInUnionValidation) {
Environment environment;
- Array<int8_t> array(2);
+ auto array = Array<int8_t>::New(2);
array[0] = 8;
array[1] = 9;
« no previous file with comments | « mojo/public/cpp/bindings/tests/type_conversion_unittest.cc ('k') | mojo/public/cpp/bindings/tests/versioning_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698