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 LFormat52c_autofix;
     31 .super Ljava/lang/Object;
     32 .source "Format52c_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-iput-iget-jumbo()V
     41     .registers 3
     42     .annotation runtime Lorg/junit/Test;
     43     .end annotation
     44 
     45     new-instance v2, LzzzInstanceFields;
     46     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
     47 
     48     const v0, 23
     49     iput v0, v2, LzzzInstanceFields;->field99999:I
     50 
     51     iget v1, v2, LzzzInstanceFields;->field99999:I
     52 
     53     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
     54     return-void
     55 .end method
     56 
     57 .method public test-iput-object-iget-object-jumbo()V
     58     .registers 3
     59     .annotation runtime Lorg/junit/Test;
     60     .end annotation
     61 
     62     new-instance v2, LzzzInstanceFields;
     63     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
     64 
     65     new-instance v0, Ljava/lang/Object;
     66     invoke-direct {v0}, Ljava/lang/Object;-><init>()V
     67 
     68     iput-object v0, v2, LzzzInstanceFields;->field99999Object:Ljava/lang/Object;
     69 
     70     iget-object v1, v2, LzzzInstanceFields;->field99999Object:Ljava/lang/Object;
     71 
     72     invoke-static/range {v0 .. v1}, Lorg/junit/Assert;->assertEquals(Ljava/lang/Object;Ljava/lang/Object;)V
     73     return-void
     74 .end method
     75 
     76 .method public test-iput-wide-iget-wide-jumbo()V
     77     .registers 5
     78     .annotation runtime Lorg/junit/Test;
     79     .end annotation
     80 
     81     new-instance v4, LzzzInstanceFields;
     82     invoke-direct/range {v4}, LzzzInstanceFields;-><init>()V
     83 
     84     const-wide v0, 0x200000000L
     85 
     86     iput-wide v0, v4, LzzzInstanceFields;->field99999Wide:J
     87 
     88     iget-wide v2, v4, LzzzInstanceFields;->field99999Wide:J
     89 
     90     invoke-static/range {v0 .. v3}, Lorg/junit/Assert;->assertEquals(JJ)V
     91     return-void
     92 .end method
     93 
     94 .method public test-iput-boolean-iget-boolean-true-jumbo()V
     95     .registers 3
     96     .annotation runtime Lorg/junit/Test;
     97     .end annotation
     98 
     99     new-instance v2, LzzzInstanceFields;
    100     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
    101 
    102     const v0, 1
    103 
    104     iput-boolean v0, v2, LzzzInstanceFields;->field99999Boolean:Z
    105 
    106     iget-boolean v1, v2, LzzzInstanceFields;->field99999Boolean:Z
    107 
    108     invoke-static/range {v1}, Lorg/junit/Assert;->assertTrue(Z)V
    109     return-void
    110 .end method
    111 
    112 .method public test-iput-boolean-iget-boolean-false-jumbo()V
    113     .registers 3
    114     .annotation runtime Lorg/junit/Test;
    115     .end annotation
    116 
    117     new-instance v2, LzzzInstanceFields;
    118     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
    119 
    120     const v0, 0
    121 
    122     iput-boolean v0, v2, LzzzInstanceFields;->field99999Boolean:Z
    123 
    124     iget-boolean v1, v2, LzzzInstanceFields;->field99999Boolean:Z
    125 
    126     invoke-static/range {v1}, Lorg/junit/Assert;->assertFalse(Z)V
    127     return-void
    128 .end method
    129 
    130 .method public test-iput-byte-iget-byte-jumbo()V
    131     .registers 3
    132     .annotation runtime Lorg/junit/Test;
    133     .end annotation
    134 
    135     new-instance v2, LzzzInstanceFields;
    136     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
    137 
    138     const v0, 120T
    139 
    140     iput-byte v0, v2, LzzzInstanceFields;->field99999Byte:B
    141 
    142     iget-byte v1, v2, LzzzInstanceFields;->field99999Byte:B
    143 
    144     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
    145     return-void
    146 .end method
    147 
    148 .method public test-iput-char-iget-char-jumbo()V
    149     .registers 3
    150     .annotation runtime Lorg/junit/Test;
    151     .end annotation
    152 
    153     new-instance v2, LzzzInstanceFields;
    154     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
    155 
    156     const v0, 'a'
    157 
    158     iput-char v0, v2, LzzzInstanceFields;->field99999Char:C
    159 
    160     iget-char v1, v2, LzzzInstanceFields;->field99999Char:C
    161 
    162     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
    163     return-void
    164 .end method
    165 
    166 .method public test-iput-short-iget-short-jumbo()V
    167     .registers 3
    168     .annotation runtime Lorg/junit/Test;
    169     .end annotation
    170 
    171     new-instance v2, LzzzInstanceFields;
    172     invoke-direct/range {v2}, LzzzInstanceFields;-><init>()V
    173 
    174     const v0, 1234S
    175 
    176     iput-short v0, v2, LzzzInstanceFields;->field99999Short:S
    177 
    178     iget-short v1, v2, LzzzInstanceFields;->field99999Short:S
    179 
    180     invoke-static/range {v0 .. v1}, LAssert;->assertEquals(II)V
    181     return-void
    182 .end method