From f532d97b54cd6c830276f59332beaecb7299c818 Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Sat, 6 Jun 2009 21:44:29 +0000 Subject: [PATCH] Added tests for format 22x git-svn-id: https://smali.googlecode.com/svn/trunk@107 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- .../Format22x/Format22x.smali | 51 +++++++++++++++++++ src/test/smali/junit-tests/TestSuite.smali | 1 + 2 files changed, 52 insertions(+) create mode 100644 src/test/smali/junit-tests/InstructionTests/Format22x/Format22x.smali diff --git a/src/test/smali/junit-tests/InstructionTests/Format22x/Format22x.smali b/src/test/smali/junit-tests/InstructionTests/Format22x/Format22x.smali new file mode 100644 index 00000000..abcfaf7a --- /dev/null +++ b/src/test/smali/junit-tests/InstructionTests/Format22x/Format22x.smali @@ -0,0 +1,51 @@ +.class public LFormat22x; +.super Ljava/lang/Object; +.source "Format22x.smali" + +.method public constructor ()V + .registers 1 + invoke-direct {p0}, Ljava/lang/Object;->()V + return-void +.end method + +.method public test_move-from16()V + .registers 276 + .annotation runtime Lorg/junit/Test; + .end annotation + + const v0, 6 + move/16 v275, v0 + + move/from16 v1, v275 + + invoke-static {v0, v1}, LAssert;->assertEquals(II)V + return-void +.end method + +.method public test_move-wide-from16()V + .registers 276 + .annotation runtime Lorg/junit/Test; + .end annotation + + const-wide v0, 0x200000000L + move-wide/16 v274, v0 + + move-wide/from16 v2, v274 + + invoke-static {v0, v1, v2, v3}, Lorg/junit/Assert;->assertEquals(JJ)V + return-void +.end method + +.method public test_move-object-from16()V + .registers 276 + .annotation runtime Lorg/junit/Test; + .end annotation + + const-string v0, "6" + move-object/16 v275, v0 + + move-object/from16 v1, v275 + + 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 6ca06bb0..52febb50 100644 --- a/src/test/smali/junit-tests/TestSuite.smali +++ b/src/test/smali/junit-tests/TestSuite.smali @@ -28,6 +28,7 @@ LFormat11x;, LFormat12x;, LFormat20t;, + LFormat22x;, LFormat30t; } .end annotation \ No newline at end of file