diff options
author | ajmichael <ajmichael@google.com> | 2017-09-13 20:37:20 +0200 |
---|---|---|
committer | Ivan Gavrilovic <gavra@google.com> | 2017-09-22 23:28:10 +0100 |
commit | 7f6f08b9b78fd02cdea4157980a42b576ae3c504 (patch) | |
tree | 214beeda0b66023cac62ca9acbd9d2dc8dba6f3d /test/java/com/google/devtools/build/android/desugar/static_initializer_of_functional_interface_should_not_execute.sh | |
parent | 8c3292b0ae37edbbc3470d3a3ad34fffd2aef413 (diff) | |
download | desugar-7f6f08b9b78fd02cdea4157980a42b576ae3c504.tar.gz |
Open source tests for Android desugarer.
These tests will fail with a helpful error message if you do not have android_sdk_repository set up. They currently require that platform 25 be installed in your SDK.
RELNOTES: None
PiperOrigin-RevId: 168570577
GitOrigin-RevId: d60e0d02eb56e27f98086d764c6d9f88898d920d
Change-Id: I27f71669816c963111a92762a9f3dffddabfa0f6
Diffstat (limited to 'test/java/com/google/devtools/build/android/desugar/static_initializer_of_functional_interface_should_not_execute.sh')
-rwxr-xr-x | test/java/com/google/devtools/build/android/desugar/static_initializer_of_functional_interface_should_not_execute.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/java/com/google/devtools/build/android/desugar/static_initializer_of_functional_interface_should_not_execute.sh b/test/java/com/google/devtools/build/android/desugar/static_initializer_of_functional_interface_should_not_execute.sh new file mode 100755 index 0000000..32b4c5a --- /dev/null +++ b/test/java/com/google/devtools/build/android/desugar/static_initializer_of_functional_interface_should_not_execute.sh @@ -0,0 +1,22 @@ +#!/bin/bash -e +# +# Copyright 2016 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Test whether Desugar runs static initializers of interfaces. +if grep "THIS STRING IS NOT EXPECTED TO APPEAR IN THE OUTPUT OF DESUGAR!!!" "${1}" ; then + exit 1 +else + exit 0 +fi |