Home | History | Annotate | Download | only in jumbo-field-tests
      1 #Copyright 2011, Google Inc.
      2 #All rights reserved.
      3 #
      4 #Redistribution and use in source and binary forms, with or without
      5 #modification, are permitted provided that the following conditions are
      6 #met:
      7 #
      8 #    * Redistributions of source code must retain the above copyright
      9 #notice, this list of conditions and the following disclaimer.
     10 #    * Redistributions in binary form must reproduce the above
     11 #copyright notice, this list of conditions and the following disclaimer
     12 #in the documentation and/or other materials provided with the
     13 #distribution.
     14 #    * Neither the name of Google Inc. nor the names of its
     15 #contributors may be used to endorse or promote products derived from
     16 #this software without specific prior written permission.
     17 #
     18 #THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     19 #"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     20 #LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     21 #A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     22 #OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     23 #SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     24 #LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     25 #DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     26 #THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     27 #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     28 #OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     29 
     30 .class public LFormat41c_autofix;
     31 .super Ljava/lang/Object;
     32 .source "Format41c_autofix.smali"
     33 
     34 .method public constructor <init>()V
     35     .registers 1
     36     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
     37     return-void
     38 .end method
     39 
     40 .method public test-sput-sget-jumbo()V
     41     .registers 2
     42     .annotation runtime Lorg/junit/Test;
     43     .end annotation
     44 
     45     const v0, 23
     46     sput v0, LManyStaticFields;->field99999:I
     47 
     48     sget v1, LManyStaticFields;->field99999:I
     49 
     50     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
     51     return-void
     52 .end method
     53 
     54 .method public test-sput-object-sget-object-jumbo()V
     55     .registers 2
     56     .annotation runtime Lorg/junit/Test;
     57     .end annotation
     58 
     59     new-instance v0, Ljava/lang/Object;
     60     invoke-direct {v0}, Ljava/lang/Object;-><init>()V
     61 
     62     sput-object v0, LManyStaticFields;->field99999Object:Ljava/lang/Object;
     63 
     64     sget-object v1, LManyStaticFields;->field99999Object:Ljava/lang/Object;
     65 
     66     invoke-static/range {v0 .. v1}, Lorg/junit/Assert;->assertEquals(Ljava/lang/Object;Ljava/lang/Object;)V
     67     return-void
     68 .end method
     69 
     70 .method public test-sput-wide-sget-wide-jumbo()V
     71     .registers 4
     72     .annotation runtime Lorg/junit/Test;
     73     .end annotation
     74 
     75     const-wide v0, 0x200000000L
     76 
     77     sput-wide v0, LManyStaticFields;->field99999Wide:J
     78 
     79     sget-wide v2, LManyStaticFields;->field99999Wide:J
     80 
     81     invoke-static/range {v0 .. v3}, Lorg/junit/Assert;->assertEquals(JJ)V
     82     return-void
     83 .end method
     84 
     85 .method public test-sput-boolean-sget-boolean-true-jumbo()V
     86     .registers 2
     87     .annotation runtime Lorg/junit/Test;
     88     .end annotation
     89 
     90     const v0, 1
     91 
     92     sput-boolean v0, LManyStaticFields;->field99999Boolean:Z
     93 
     94     sget-boolean v1, LManyStaticFields;->field99999Boolean:Z
     95 
     96     invoke-static/range {v1}, Lorg/junit/Assert;->assertTrue(Z)V
     97     return-void
     98 .end method
     99 
    100 .method public test-sput-boolean-sget-boolean-false-jumbo()V
    101     .registers 2
    102     .annotation runtime Lorg/junit/Test;
    103     .end annotation
    104 
    105     const v0, 0
    106 
    107     sput-boolean v0, LManyStaticFields;->field99999Boolean:Z
    108 
    109     sget-boolean v1, LManyStaticFields;->field99999Boolean:Z
    110 
    111     invoke-static/range {v1}, Lorg/junit/Assert;->assertFalse(Z)V
    112     return-void
    113 .end method
    114 
    115 .method public test-sput-byte-sget-byte-jumbo()V
    116     .registers 2
    117     .annotation runtime Lorg/junit/Test;
    118     .end annotation
    119 
    120     const v0, 120T
    121 
    122     sput-byte v0, LManyStaticFields;->field99999Byte:B
    123 
    124     sget-byte v1, LManyStaticFields;->field99999Byte:B
    125 
    126     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
    127     return-void
    128 .end method
    129 
    130 .method public test-sput-char-sget-char-jumbo()V
    131     .registers 2
    132     .annotation runtime Lorg/junit/Test;
    133     .end annotation
    134 
    135     const v0, 'a'
    136 
    137     sput-char v0, LManyStaticFields;->field99999Char:C
    138 
    139     sget-char v1, LManyStaticFields;->field99999Char:C
    140 
    141     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
    142     return-void
    143 .end method
    144 
    145 .method public test-sput-short-sget-short-jumbo()V
    146     .registers 2
    147     .annotation runtime Lorg/junit/Test;
    148     .end annotation
    149 
    150     const v0, 1234S
    151 
    152     sput-short v0, LManyStaticFields;->field99999Short:S
    153 
    154     sget-short v1, LManyStaticFields;->field99999Short:S
    155 
    156     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
    157     return-void
    158 .end method