Reformat the test to make them more readable.
Test: treehugger
Change-Id: I28ccd531a5dadcee3cbdebd5f5ba6db1605662d9
diff --git a/android/bazel_handler_test.go b/android/bazel_handler_test.go
index 1c9aca0..ec2541b 100644
--- a/android/bazel_handler_test.go
+++ b/android/bazel_handler_test.go
@@ -65,13 +65,9 @@
var testCases = []testCase{
{`
{
- "artifacts": [{
- "id": 1,
- "pathFragmentId": 1
- }, {
- "id": 2,
- "pathFragmentId": 2
- }],
+ "artifacts": [
+ { "id": 1, "pathFragmentId": 1 },
+ { "id": 2, "pathFragmentId": 2 }],
"actions": [{
"targetId": 1,
"actionKey": "x",
@@ -81,28 +77,18 @@
"outputIds": [1],
"primaryOutputId": 1
}],
- "depSetOfFiles": [{
- "id": 1,
- "directArtifactIds": [1, 2]
- }],
- "pathFragments": [{
- "id": 1,
- "label": "one"
- }, {
- "id": 2,
- "label": "two"
- }]
+ "depSetOfFiles": [
+ { "id": 1, "directArtifactIds": [1, 2] }],
+ "pathFragments": [
+ { "id": 1, "label": "one" },
+ { "id": 2, "label": "two" }]
}`,
"cd 'test/exec_root' && rm -f 'one' && touch foo",
}, {`
{
- "artifacts": [{
- "id": 1,
- "pathFragmentId": 10
- }, {
- "id": 2,
- "pathFragmentId": 20
- }],
+ "artifacts": [
+ { "id": 1, "pathFragmentId": 10 },
+ { "id": 2, "pathFragmentId": 20 }],
"actions": [{
"targetId": 100,
"actionKey": "x",
@@ -111,18 +97,10 @@
"outputIds": [1, 2],
"primaryOutputId": 1
}],
- "pathFragments": [{
- "id": 10,
- "label": "one",
- "parentId": 30
- }, {
- "id": 20,
- "label": "one.d",
- "parentId": 30
- }, {
- "id": 30,
- "label": "parent"
- }]
+ "pathFragments": [
+ { "id": 10, "label": "one", "parentId": 30 },
+ { "id": 20, "label": "one.d", "parentId": 30 },
+ { "id": 30, "label": "parent" }]
}`,
`cd 'test/exec_root' && rm -f 'parent/one' && bogus command && sed -i'' -E 's@(^|\s|")bazel-out/@\1test/bazel_out/@g' 'parent/one.d'`,
},
@@ -139,7 +117,7 @@
got := bazelContext.BuildStatementsToRegister()
if want := 1; len(got) != want {
- t.Errorf("expected %d registered build statements, but got %#v", want, got)
+ t.Fatalf("expected %d registered build statements, but got %#v", want, got)
}
cmd := RuleBuilderCommand{}