diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go index 14029919e..14ff4d891 100644 --- a/cc/library_sdk_member.go +++ b/cc/library_sdk_member.go @@ -258,42 +258,52 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b // values where necessary. for _, propertyInfo := range includeDirProperties { // Calculate the base directory in the snapshot into which the files will be copied. - // lib.ArchType is "" for common properties. + // lib.archType is "" for common properties. targetDir := filepath.Join(libInfo.OsPrefix(), libInfo.archType, propertyInfo.snapshotDir) propertyName := propertyInfo.propertyName // Iterate over each path in one of the include directory properties. for _, path := range propertyInfo.pathsGetter(libInfo) { + inputPath := path.String() + + // Map the input path to a snapshot relative path. The mapping is independent of the module + // that references them so that if multiple modules within the same snapshot export the same + // header files they end up in the same place in the snapshot and so do not get duplicated. + targetRelativePath := inputPath + if isGeneratedHeaderDirectory(path) { + // Remove everything up to the .intermediates/ from the generated output directory to + // leave a module relative path. + base := android.PathForIntermediates(sdkModuleContext, "") + targetRelativePath = android.Rel(sdkModuleContext, base.String(), inputPath) + } + + snapshotRelativePath := filepath.Join(targetDir, targetRelativePath) // Copy the files/directories when necessary. if propertyInfo.copy { if propertyInfo.dirs { // When copying a directory glob and copy all the headers within it. // TODO(jiyong) copy headers having other suffixes - headers, _ := sdkModuleContext.GlobWithDeps(path.String()+"/**/*.h", nil) + headers, _ := sdkModuleContext.GlobWithDeps(inputPath+"/**/*.h", nil) for _, file := range headers { src := android.PathForSource(sdkModuleContext, file) - dest := filepath.Join(targetDir, file) + + // The destination path in the snapshot is constructed from the snapshot relative path + // of the input directory and the input directory relative path of the header file. + inputRelativePath := android.Rel(sdkModuleContext, inputPath, file) + dest := filepath.Join(snapshotRelativePath, inputRelativePath) builder.CopyToSnapshot(src, dest) } } else { - // Otherwise, just copy the files. - dest := filepath.Join(targetDir, libInfo.name, path.Rel()) - builder.CopyToSnapshot(path, dest) + // Otherwise, just copy the file to its snapshot relative path. + builder.CopyToSnapshot(path, snapshotRelativePath) } } // Only directories are added to a property. if propertyInfo.dirs { - var snapshotPath string - if isGeneratedHeaderDirectory(path) { - snapshotPath = filepath.Join(targetDir, libInfo.name) - } else { - snapshotPath = filepath.Join(targetDir, path.String()) - } - - includeDirs[propertyName] = append(includeDirs[propertyName], snapshotPath) + includeDirs[propertyName] = append(includeDirs[propertyName], snapshotRelativePath) } } } @@ -330,9 +340,6 @@ type nativeLibInfoProperties struct { memberType *librarySdkMemberType - // The name of the library, is not exported as this must not be changed during optimization. - name string - // archType is not exported as if set (to a non default value) it is always arch specific. // This is "" for common properties. archType string @@ -419,7 +426,6 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte exportedIncludeDirs, exportedGeneratedIncludeDirs := android.FilterPathListPredicate( exportedInfo.IncludeDirs, isGeneratedHeaderDirectory) - p.name = variant.Name() p.archType = ccModule.Target().Arch.ArchType.String() // Make sure that the include directories are unique. diff --git a/sdk/cc_sdk_test.go b/sdk/cc_sdk_test.go index 6fd6b09d7..5b132417e 100644 --- a/sdk/cc_sdk_test.go +++ b/sdk/cc_sdk_test.go @@ -499,15 +499,15 @@ cc_prebuilt_library_shared { arm64: { srcs: ["arm64/lib/mynativelib.so"], export_include_dirs: [ - "arm64/include_gen/mynativelib", - "arm64/include_gen/mynativelib", + "arm64/include_gen/generated_foo/gen", + "arm64/include_gen/generated_foo/gen/protos", ], }, arm: { srcs: ["arm/lib/mynativelib.so"], export_include_dirs: [ - "arm/include_gen/mynativelib", - "arm/include_gen/mynativelib", + "arm/include_gen/generated_foo/gen", + "arm/include_gen/generated_foo/gen/protos", ], }, }, @@ -516,9 +516,9 @@ cc_prebuilt_library_shared { checkAllCopyRules(` myinclude/Test.h -> include/myinclude/Test.h .intermediates/mynativelib/android_arm64_armv8-a_shared/mynativelib.so -> arm64/lib/mynativelib.so -.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm64/include_gen/mynativelib/generated_foo/protos/foo/bar.h +.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm64/include_gen/generated_foo/gen/generated_foo/protos/foo/bar.h .intermediates/mynativelib/android_arm_armv7-a-neon_shared/mynativelib.so -> arm/lib/mynativelib.so -.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm/include_gen/mynativelib/generated_foo/protos/foo/bar.h +.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm/include_gen/generated_foo/gen/generated_foo/protos/foo/bar.h `), ) } @@ -1119,11 +1119,11 @@ cc_prebuilt_library_shared { arch: { arm64: { srcs: ["arm64/lib/mynativelib.so"], - export_include_dirs: ["arm64/include_gen/mynativelib"], + export_include_dirs: ["arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl"], }, arm: { srcs: ["arm/lib/mynativelib.so"], - export_include_dirs: ["arm/include_gen/mynativelib"], + export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl"], }, }, } @@ -1131,13 +1131,13 @@ cc_prebuilt_library_shared { checkAllCopyRules(` myinclude/Test.h -> include/myinclude/Test.h .intermediates/mynativelib/android_arm64_armv8-a_shared/mynativelib.so -> arm64/lib/mynativelib.so -.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BpTest.h .intermediates/mynativelib/android_arm_armv7-a-neon_shared/mynativelib.so -> arm/lib/mynativelib.so -.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BpTest.h `), ) } @@ -1321,12 +1321,12 @@ cc_prebuilt_library_shared { linux_glibc_x86_64: { enabled: true, srcs: ["x86_64/lib/mynativelib.so"], - export_include_dirs: ["x86_64/include_gen/mynativelib"], + export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl"], }, linux_glibc_x86: { enabled: true, srcs: ["x86/lib/mynativelib.so"], - export_include_dirs: ["x86/include_gen/mynativelib"], + export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"], }, }, } @@ -1353,12 +1353,12 @@ cc_prebuilt_library_shared { linux_glibc_x86_64: { enabled: true, srcs: ["x86_64/lib/mynativelib.so"], - export_include_dirs: ["x86_64/include_gen/mynativelib"], + export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl"], }, linux_glibc_x86: { enabled: true, srcs: ["x86/lib/mynativelib.so"], - export_include_dirs: ["x86/include_gen/mynativelib"], + export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"], }, }, } @@ -1385,13 +1385,13 @@ sdk_snapshot { checkAllCopyRules(` myinclude/Test.h -> include/myinclude/Test.h .intermediates/mynativelib/linux_glibc_x86_64_shared/mynativelib.so -> x86_64/lib/mynativelib.so -.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BpTest.h .intermediates/mynativelib/linux_glibc_x86_shared/mynativelib.so -> x86/lib/mynativelib.so -.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BpTest.h `), ) } @@ -1569,11 +1569,11 @@ cc_prebuilt_library_static { arch: { arm64: { srcs: ["arm64/lib/mynativelib.a"], - export_include_dirs: ["arm64/include_gen/mynativelib"], + export_include_dirs: ["arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl"], }, arm: { srcs: ["arm/lib/mynativelib.a"], - export_include_dirs: ["arm/include_gen/mynativelib"], + export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl"], }, }, } @@ -1581,13 +1581,13 @@ cc_prebuilt_library_static { checkAllCopyRules(` myinclude/Test.h -> include/myinclude/Test.h .intermediates/mynativelib/android_arm64_armv8-a_static/mynativelib.a -> arm64/lib/mynativelib.a -.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BpTest.h .intermediates/mynativelib/android_arm_armv7-a-neon_static/mynativelib.a -> arm/lib/mynativelib.a -.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BpTest.h `), ) } @@ -1638,12 +1638,12 @@ cc_prebuilt_library_static { linux_glibc_x86_64: { enabled: true, srcs: ["x86_64/lib/mynativelib.a"], - export_include_dirs: ["x86_64/include_gen/mynativelib"], + export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"], }, linux_glibc_x86: { enabled: true, srcs: ["x86/lib/mynativelib.a"], - export_include_dirs: ["x86/include_gen/mynativelib"], + export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl"], }, }, } @@ -1669,12 +1669,12 @@ cc_prebuilt_library_static { linux_glibc_x86_64: { enabled: true, srcs: ["x86_64/lib/mynativelib.a"], - export_include_dirs: ["x86_64/include_gen/mynativelib"], + export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"], }, linux_glibc_x86: { enabled: true, srcs: ["x86/lib/mynativelib.a"], - export_include_dirs: ["x86/include_gen/mynativelib"], + export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl"], }, }, } @@ -1701,13 +1701,13 @@ module_exports_snapshot { checkAllCopyRules(` myinclude/Test.h -> include/myinclude/Test.h .intermediates/mynativelib/linux_glibc_x86_64_static/mynativelib.a -> x86_64/lib/mynativelib.a -.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h .intermediates/mynativelib/linux_glibc_x86_static/mynativelib.a -> x86/lib/mynativelib.a -.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BpTest.h `), ) } @@ -1866,7 +1866,7 @@ cc_prebuilt_library_static { linux_glibc_x86_64: { enabled: true, srcs: ["x86_64/lib/mynativelib.a"], - export_include_dirs: ["x86_64/include_gen/mynativelib"], + export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"], }, }, } @@ -1892,7 +1892,7 @@ cc_prebuilt_library_static { linux_glibc_x86_64: { enabled: true, srcs: ["x86_64/lib/mynativelib.a"], - export_include_dirs: ["x86_64/include_gen/mynativelib"], + export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"], }, }, } @@ -1917,9 +1917,9 @@ module_exports_snapshot { checkAllCopyRules(` myinclude/Test.h -> include/myinclude/Test.h .intermediates/mynativelib/linux_glibc_x86_64_static/mynativelib.a -> x86_64/lib/mynativelib.a -.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/Test.h -.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BnTest.h -.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BpTest.h +.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h +.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h +.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h `), ) } diff --git a/sdk/testing.go b/sdk/testing.go index 3910e6ad2..0bbf7f443 100644 --- a/sdk/testing.go +++ b/sdk/testing.go @@ -204,7 +204,11 @@ func (h *TestHelper) AssertErrorMessageEquals(message string, expected string, a func (h *TestHelper) AssertTrimmedStringEquals(message string, expected string, actual string) { h.t.Helper() - h.AssertStringEquals(message, strings.TrimSpace(expected), strings.TrimSpace(actual)) + expected = strings.TrimSpace(expected) + actual = strings.TrimSpace(actual) + if actual != expected { + h.t.Errorf("%s: expected:\n%s\nactual:\n%s\n", message, expected, actual) + } } func (h *TestHelper) AssertDeepEquals(message string, expected interface{}, actual interface{}) {