diff options
author | Vladimir Marko <vmarko@google.com> | 2014-02-10 09:59:43 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-02-10 10:48:12 +0000 |
commit | 8017ef8760555c7d0ae65d5f2ec6a8f093e7dbb0 (patch) | |
tree | a5fa20ffeabe069da84bd71c667da33e34975aeb /test/083-compiler-regressions | |
parent | b1851650fc457a50cfa2c8eec2611da081b822c4 (diff) | |
download | art-8017ef8760555c7d0ae65d5f2ec6a8f093e7dbb0.zip art-8017ef8760555c7d0ae65d5f2ec6a8f093e7dbb0.tar.gz art-8017ef8760555c7d0ae65d5f2ec6a8f093e7dbb0.tar.bz2 |
Add wide setter test with preceding parameters as int.
Change-Id: Ieeef0318d140aad963f75e5d14938e5e7a9eec41
Diffstat (limited to 'test/083-compiler-regressions')
-rw-r--r-- | test/083-compiler-regressions/src/Main.java | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/test/083-compiler-regressions/src/Main.java b/test/083-compiler-regressions/src/Main.java index fb65471..3307e50 100644 --- a/test/083-compiler-regressions/src/Main.java +++ b/test/083-compiler-regressions/src/Main.java @@ -90,12 +90,25 @@ public class Main { foo.wideSetBar4(0,0,0,sum); sum += foo.wideGetBar5(1,2,3,4,5); foo.wideSetBar5(0,0,0,0,sum); - if (foo.wideGetBar0() == 39488) { + long result1 = foo.wideGetBar0(); + long expected1 = 1234L << 5; + sum += foo.wideGetBar0(); + foo.wideSetBar2i(0,sum); + sum += foo.wideGetBar0(); + foo.wideSetBar3i(0,0,sum); + sum += foo.wideGetBar0(); + foo.wideSetBar4i(0,0,0,sum); + sum += foo.wideGetBar0(); + foo.wideSetBar5i(0,0,0,0,sum); + long result2 = foo.wideGetBar0(); + long expected2 = 1234L << 9; + if (result1 == expected1 && result2 == expected2) { System.out.println("wideGetterSetterTest passes"); } else { System.out.println("wideGetterSetterTest fails: " + - foo.wideGetBar0() + " (expecting 39488)"); + "result1: " + result1 + " (expecting " + expected1 + "), " + + "result2: " + result2 + " (expecting " + expected2 + ")"); } } @@ -8374,6 +8387,18 @@ class Foo { public void wideSetBar5(long a1, long a2, long a3, long a4, long a5) { lbar = a5; } + public void wideSetBar2i(int a1, long a2) { + lbar = a2; + } + public void wideSetBar3i(int a1, int a2, long a3) { + lbar = a3; + } + public void wideSetBar4i(int a1, int a2, int a3, long a4) { + lbar = a4; + } + public void wideSetBar5i(int a1, int a2, int a3, int a4, long a5) { + lbar = a5; + } public long wideGetBar0() { return lbar; } |