summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2021-04-21 17:44:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-04-21 17:44:55 +0000
commit31031a91f1da3e5acdc493e88d98589b5a6dce2f (patch)
tree364ecd3aba9f0b0566837153aa7a9148cbe908bb /tools/aapt2/java/JavaClassGenerator_test.cpp
parent991791446c1e1a5dea9f4a8e716c4237865dd64e (diff)
parentefcdb95fa7cf2da7d599e0bcda250514ac5ee048 (diff)
Merge "Aapt2 ValueTransformer" into sc-dev
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
-rw-r--r--tools/aapt2/java/JavaClassGenerator_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/aapt2/java/JavaClassGenerator_test.cpp b/tools/aapt2/java/JavaClassGenerator_test.cpp
index 8bb3ee93d312..d08b61e5ff66 100644
--- a/tools/aapt2/java/JavaClassGenerator_test.cpp
+++ b/tools/aapt2/java/JavaClassGenerator_test.cpp
@@ -334,11 +334,12 @@ TEST(JavaClassGeneratorTest, CommentsForStyleablesAndNestedAttributesArePresent)
styleable.entries.push_back(Reference(test::ParseNameOrDie("android:attr/one")));
styleable.SetComment(StringPiece("This is a styleable"));
+ CloningValueTransformer cloner(nullptr);
std::unique_ptr<ResourceTable> table =
test::ResourceTableBuilder()
.AddValue("android:attr/one", util::make_unique<Attribute>(attr))
.AddValue("android:styleable/Container",
- std::unique_ptr<Styleable>(styleable.Clone(nullptr)))
+ std::unique_ptr<Styleable>(styleable.Transform(cloner)))
.Build();
std::unique_ptr<IAaptContext> context =
@@ -371,11 +372,12 @@ TEST(JavaClassGeneratorTest, CommentsForStyleableHiddenAttributesAreNotPresent)
styleable.entries.push_back(Reference(test::ParseNameOrDie("android:attr/one")));
styleable.SetComment(StringPiece("This is a styleable"));
+ CloningValueTransformer cloner(nullptr);
std::unique_ptr<ResourceTable> table =
test::ResourceTableBuilder()
.AddValue("android:attr/one", util::make_unique<Attribute>(attr))
.AddValue("android:styleable/Container",
- std::unique_ptr<Styleable>(styleable.Clone(nullptr)))
+ std::unique_ptr<Styleable>(styleable.Transform(cloner)))
.Build();
std::unique_ptr<IAaptContext> context =