diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-24 19:12:06 -0400 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-25 02:37:31 -0400 |
| commit | b39e6bd61590e429b6fd42734f1485b94335af5f (patch) | |
| tree | 941510a65aa47b6456a1cfaf678a03afaeacf942 /tests/indent/smali/array_and_switch.smali | |
| parent | feat(smali): update queries from upstream parser (diff) | |
| download | nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.tar nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.tar.gz nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.tar.bz2 nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.tar.lz nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.tar.xz nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.tar.zst nvim-treesitter-b39e6bd61590e429b6fd42734f1485b94335af5f.zip | |
chore(smali): add tests
Diffstat (limited to 'tests/indent/smali/array_and_switch.smali')
| -rw-r--r-- | tests/indent/smali/array_and_switch.smali | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/indent/smali/array_and_switch.smali b/tests/indent/smali/array_and_switch.smali new file mode 100644 index 000000000..3ee3f6d01 --- /dev/null +++ b/tests/indent/smali/array_and_switch.smali @@ -0,0 +1,58 @@ +.class public Lbaksmali/test/class; +.super Ljava/lang/Object; + +.source "baksmali_test_class.smali" + +.method public testMethod(ILjava/lang/String;)Ljava/lang/String; + .registers 3 + .annotation runtime Lorg/junit/Test; + .end annotation + .annotation system Lyet/another/annotation; + somevalue = 1234 + anothervalue = 3.14159 + .end annotation + + const-string v0, "testing\n123" + + goto switch: + + sget v0, Lbaksmali/test/class;->staticField:I + + switch: + packed-switch v0, pswitch: + + try_start: + const/4 v0, 7 + const v0, 10 + nop + try_end: + .catch Ljava/lang/Exception; {try_start: .. try_end:} handler: + .catchall {try_start: .. try_end:} handler2: + + handler: + + Label10: + Label11: + Label12: + Label13: + return-object v0 + + + + .array-data 4 + 1 2 3 4 5 6 200 + .end array-data + + pswitch: + .packed-switch 10 + Label10: + Label11: + Label12: + Label13: + .end packed-switch + + handler2: + + return-void + +.end method |
