From 520917af9d71b11bcc2179f1dfdb6c701dffe044 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 13 May 2022 13:01:59 +0000 Subject: Pass pointer to dependencyTag instead of copying struct A follow up change will add some more fields to the tag which will make passing the struct around by value will get more expensive. Switching to pointers will make this slightly more efficient. Changing the type of the tags from dependencyTag to *dependencyTag broke a test. Rather than simply patch the test and then maybe have to patch it again in the next change this adds a a String() method that will insulate the test from being affected by changes in the dependencyTag contents. Bug: 232401814 Test: m nothing Change-Id: I23da742ebffb74ef3b9b68f772519ceb38332f5f --- apex/apex_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apex/apex_test.go') diff --git a/apex/apex_test.go b/apex/apex_test.go index bcb55af87..07372a308 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -5931,7 +5931,7 @@ func TestApexAvailable_DirectDep(t *testing.T) { func TestApexAvailable_IndirectDep(t *testing.T) { // libbbaz is an indirect dep testApexError(t, `requires "libbaz" that doesn't list the APEX under 'apex_available'.\n\nDependency path: -.*via tag apex\.dependencyTag.*name:sharedLib.* +.*via tag apex\.dependencyTag\{"sharedLib"\} .*-> libfoo.*link:shared.* .*via tag cc\.libraryDependencyTag.*Kind:sharedLibraryDependency.* .*-> libbar.*link:shared.* -- cgit v1.2.3-59-g8ed1b