summaryrefslogtreecommitdiff
path: root/java/droidstubs_test.go
diff options
context:
space:
mode:
author Liz Kammer <eakammer@google.com> 2022-01-05 13:46:24 -0500
committer Liz Kammer <eakammer@google.com> 2022-01-11 10:47:23 -0500
commit9525e71003bb1bc17301b04894e2b3cc715772ca (patch)
treef8ace56c3d00c756f7b0733d959dd1ffb7b9bf23 /java/droidstubs_test.go
parented4900f9d9cfa3495c5ee77788c0aaed22b45b6e (diff)
Add SetProperties to json-module-graph
SetProperties contains name and type of properties set in the bp file and any set via defaults. There may be properties that were not specified in an Android.bp file due to: * specified via go code (e.g. LoadHooks) * property is _not_ a pointer -- so it is not possible to tell between not set in bp file and default value. Test: soong tests Test: m json-module-graph and verify Change-Id: I4cb868b1d7db566e72636c6fb53bb9c7090f236a
Diffstat (limited to 'java/droidstubs_test.go')
-rw-r--r--java/droidstubs_test.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go
index 573821749..82ebba7b1 100644
--- a/java/droidstubs_test.go
+++ b/java/droidstubs_test.go
@@ -244,17 +244,14 @@ func TestAddJSONData(t *testing.T) {
}
jsonData := map[string]interface{}{}
prebuiltStubsSources.AddJSONData(&jsonData)
- if fmt.Sprint(jsonData) != fmt.Sprint(
+ expectedOut := []map[string]interface{}{
map[string]interface{}{
- "Android": map[string]interface{}{},
- "Actions": []map[string]interface{}{
- map[string]interface{}{
- "Inputs": []string{},
- "Outputs": []string{},
- },
- },
- }) {
- t.Errorf("The JSON data map isn't as expected %s.", jsonData)
+ "Inputs": []string{},
+ "Outputs": []string{},
+ },
+ }
+ if !reflect.DeepEqual(jsonData["Actions"], expectedOut) {
+ t.Errorf("The JSON action data %#v isn't as expected %#v.", jsonData["Actions"], expectedOut)
}
}