From bc0e62e21e91d649d76ea36b4665882ac503bca2 Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Sun, 7 Jun 2009 21:10:05 +0000 Subject: [PATCH] added tests for format 32x git-svn-id: https://smali.googlecode.com/svn/trunk@122 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- .../Format32x/Format32x.smali | 51 +++++++++++++++++++ src/test/smali/junit-tests/TestSuite.smali | 1 + 2 files changed, 52 insertions(+) create mode 100644 src/test/smali/junit-tests/InstructionTests/Format32x/Format32x.smali diff --git a/src/test/smali/junit-tests/InstructionTests/Format32x/Format32x.smali b/src/test/smali/junit-tests/InstructionTests/Format32x/Format32x.smali new file mode 100644 index 00000000..40a8264c --- /dev/null +++ b/src/test/smali/junit-tests/InstructionTests/Format32x/Format32x.smali @@ -0,0 +1,51 @@ +.class public LFormat32x; +.super Ljava/lang/Object; +.source "Format32x.smali" + +.method public constructor ()V + .registers 1 + invoke-direct {p0}, Ljava/lang/Object;->()V + return-void +.end method + +.method public test_move-16()V + .registers 500 + .annotation runtime Lorg/junit/Test; + .end annotation + + const v0, 123 + move/16 v323, v0 + move/16 v400, v323 + move/16 v1, v400 + + invoke-static {v0, v1}, LAssert;->assertEquals(II)V + return-void +.end method + +.method public test_move-wide-16()V + .registers 500 + .annotation runtime Lorg/junit/Test; + .end annotation + + const-wide v0, 0x200000000L + move-wide/16 v400, v0 + move-wide/16 v402, v400 + move-wide/16 v2, v402 + + invoke-static {v0, v1, v2, v3}, Lorg/junit/Assert;->assertEquals(JJ)V + return-void +.end method + +.method public test_move-object-16()V + .registers 500 + .annotation runtime Lorg/junit/Test; + .end annotation + + const-string v0, "123" + move-object/16 v323, v0 + move-object/16 v400, v323 + move-object/16 v1, v400 + + invoke-static {v0, v1}, Lorg/junit/Assert;->assertEquals(Ljava/lang/Object;Ljava/lang/Object;)V + return-void +.end method \ No newline at end of file diff --git a/src/test/smali/junit-tests/TestSuite.smali b/src/test/smali/junit-tests/TestSuite.smali index 74a0f31d..ec981ed5 100644 --- a/src/test/smali/junit-tests/TestSuite.smali +++ b/src/test/smali/junit-tests/TestSuite.smali @@ -39,6 +39,7 @@ LFormat22x;, LFormat23x;, LFormat30t;, + LFormat32x;, LFormat35c;, LFormat3rc; }