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