jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 1 | // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 | |
Elliott Hughes | 90a3369 | 2011-08-30 13:27:07 -0700 | [diff] [blame] | 3 | #include "dex_verifier.h" |
| 4 | |
| 5 | #include <stdio.h> |
| 6 | |
| 7 | #include "UniquePtr.h" |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 8 | #include "class_linker.h" |
| 9 | #include "common_test.h" |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 10 | #include "dex_file.h" |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 11 | |
| 12 | namespace art { |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 13 | namespace verifier { |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 14 | |
| 15 | class DexVerifierTest : public CommonTest { |
| 16 | protected: |
Brian Carlstrom | aded5f7 | 2011-10-07 17:15:04 -0700 | [diff] [blame] | 17 | void VerifyClass(ClassLoader* class_loader, const std::string& descriptor) { |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 18 | ASSERT_TRUE(descriptor != NULL); |
| 19 | Class* klass = class_linker_->FindSystemClass(descriptor); |
| 20 | |
| 21 | // Verify the class |
jeffhao | bdb7651 | 2011-09-07 11:43:16 -0700 | [diff] [blame] | 22 | ASSERT_TRUE(DexVerifier::VerifyClass(klass)); |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | void VerifyDexFile(const DexFile* dex, ClassLoader* class_loader) { |
| 26 | ASSERT_TRUE(dex != NULL); |
| 27 | |
| 28 | // Verify all the classes defined in this file |
| 29 | for (size_t i = 0; i < dex->NumClassDefs(); i++) { |
| 30 | const DexFile::ClassDef& class_def = dex->GetClassDef(i); |
| 31 | const char* descriptor = dex->GetClassDescriptor(class_def); |
| 32 | VerifyClass(class_loader, descriptor); |
| 33 | } |
| 34 | } |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | TEST_F(DexVerifierTest, LibCore) { |
| 38 | VerifyDexFile(java_lang_dex_file_.get(), NULL); |
| 39 | } |
| 40 | |
| 41 | TEST_F(DexVerifierTest, IntMath) { |
Brian Carlstrom | 40381fb | 2011-10-19 14:13:40 -0700 | [diff] [blame] | 42 | SirtRef<ClassLoader> class_loader(LoadDex("IntMath")); |
| 43 | Class* klass = class_linker_->FindClass("LIntMath;", class_loader.get()); |
jeffhao | bdb7651 | 2011-09-07 11:43:16 -0700 | [diff] [blame] | 44 | ASSERT_TRUE(DexVerifier::VerifyClass(klass)); |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 45 | } |
| 46 | |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 47 | TEST_F(DexVerifierTest, RegTypes_Primitives) { |
| 48 | RegTypeCache cache; |
| 49 | |
| 50 | const RegType& bool_reg_type = cache.Boolean(); |
| 51 | EXPECT_FALSE(bool_reg_type.IsUnknown()); |
| 52 | EXPECT_FALSE(bool_reg_type.IsConflict()); |
| 53 | EXPECT_FALSE(bool_reg_type.IsZero()); |
| 54 | EXPECT_FALSE(bool_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 55 | EXPECT_FALSE(bool_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 56 | EXPECT_TRUE(bool_reg_type.IsBoolean()); |
| 57 | EXPECT_FALSE(bool_reg_type.IsByte()); |
| 58 | EXPECT_FALSE(bool_reg_type.IsChar()); |
| 59 | EXPECT_FALSE(bool_reg_type.IsShort()); |
| 60 | EXPECT_FALSE(bool_reg_type.IsInteger()); |
| 61 | EXPECT_FALSE(bool_reg_type.IsLong()); |
| 62 | EXPECT_FALSE(bool_reg_type.IsFloat()); |
| 63 | EXPECT_FALSE(bool_reg_type.IsDouble()); |
| 64 | EXPECT_FALSE(bool_reg_type.IsReference()); |
| 65 | EXPECT_FALSE(bool_reg_type.IsLowHalf()); |
| 66 | EXPECT_FALSE(bool_reg_type.IsHighHalf()); |
| 67 | EXPECT_FALSE(bool_reg_type.IsLongOrDoubleTypes()); |
| 68 | EXPECT_FALSE(bool_reg_type.IsReferenceTypes()); |
| 69 | EXPECT_TRUE(bool_reg_type.IsCategory1Types()); |
| 70 | EXPECT_FALSE(bool_reg_type.IsCategory2Types()); |
| 71 | EXPECT_TRUE(bool_reg_type.IsBooleanTypes()); |
| 72 | EXPECT_TRUE(bool_reg_type.IsByteTypes()); |
| 73 | EXPECT_TRUE(bool_reg_type.IsShortTypes()); |
| 74 | EXPECT_TRUE(bool_reg_type.IsCharTypes()); |
| 75 | EXPECT_TRUE(bool_reg_type.IsIntegralTypes()); |
| 76 | EXPECT_FALSE(bool_reg_type.IsFloatTypes()); |
| 77 | EXPECT_FALSE(bool_reg_type.IsLongTypes()); |
| 78 | EXPECT_FALSE(bool_reg_type.IsDoubleTypes()); |
| 79 | EXPECT_TRUE(bool_reg_type.IsArrayIndexTypes()); |
| 80 | |
| 81 | const RegType& byte_reg_type = cache.Byte(); |
| 82 | EXPECT_FALSE(byte_reg_type.IsUnknown()); |
| 83 | EXPECT_FALSE(byte_reg_type.IsConflict()); |
| 84 | EXPECT_FALSE(byte_reg_type.IsZero()); |
| 85 | EXPECT_FALSE(byte_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 86 | EXPECT_FALSE(byte_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 87 | EXPECT_FALSE(byte_reg_type.IsBoolean()); |
| 88 | EXPECT_TRUE(byte_reg_type.IsByte()); |
| 89 | EXPECT_FALSE(byte_reg_type.IsChar()); |
| 90 | EXPECT_FALSE(byte_reg_type.IsShort()); |
| 91 | EXPECT_FALSE(byte_reg_type.IsInteger()); |
| 92 | EXPECT_FALSE(byte_reg_type.IsLong()); |
| 93 | EXPECT_FALSE(byte_reg_type.IsFloat()); |
| 94 | EXPECT_FALSE(byte_reg_type.IsDouble()); |
| 95 | EXPECT_FALSE(byte_reg_type.IsReference()); |
| 96 | EXPECT_FALSE(byte_reg_type.IsLowHalf()); |
| 97 | EXPECT_FALSE(byte_reg_type.IsHighHalf()); |
| 98 | EXPECT_FALSE(byte_reg_type.IsLongOrDoubleTypes()); |
| 99 | EXPECT_FALSE(byte_reg_type.IsReferenceTypes()); |
| 100 | EXPECT_TRUE(byte_reg_type.IsCategory1Types()); |
| 101 | EXPECT_FALSE(byte_reg_type.IsCategory2Types()); |
| 102 | EXPECT_FALSE(byte_reg_type.IsBooleanTypes()); |
| 103 | EXPECT_TRUE(byte_reg_type.IsByteTypes()); |
| 104 | EXPECT_TRUE(byte_reg_type.IsShortTypes()); |
| 105 | EXPECT_FALSE(byte_reg_type.IsCharTypes()); |
| 106 | EXPECT_TRUE(byte_reg_type.IsIntegralTypes()); |
| 107 | EXPECT_FALSE(byte_reg_type.IsFloatTypes()); |
| 108 | EXPECT_FALSE(byte_reg_type.IsLongTypes()); |
| 109 | EXPECT_FALSE(byte_reg_type.IsDoubleTypes()); |
| 110 | EXPECT_TRUE(byte_reg_type.IsArrayIndexTypes()); |
| 111 | |
| 112 | const RegType& char_reg_type = cache.Char(); |
| 113 | EXPECT_FALSE(char_reg_type.IsUnknown()); |
| 114 | EXPECT_FALSE(char_reg_type.IsConflict()); |
| 115 | EXPECT_FALSE(char_reg_type.IsZero()); |
| 116 | EXPECT_FALSE(char_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 117 | EXPECT_FALSE(char_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 118 | EXPECT_FALSE(char_reg_type.IsBoolean()); |
| 119 | EXPECT_FALSE(char_reg_type.IsByte()); |
| 120 | EXPECT_TRUE(char_reg_type.IsChar()); |
| 121 | EXPECT_FALSE(char_reg_type.IsShort()); |
| 122 | EXPECT_FALSE(char_reg_type.IsInteger()); |
| 123 | EXPECT_FALSE(char_reg_type.IsLong()); |
| 124 | EXPECT_FALSE(char_reg_type.IsFloat()); |
| 125 | EXPECT_FALSE(char_reg_type.IsDouble()); |
| 126 | EXPECT_FALSE(char_reg_type.IsReference()); |
| 127 | EXPECT_FALSE(char_reg_type.IsLowHalf()); |
| 128 | EXPECT_FALSE(char_reg_type.IsHighHalf()); |
| 129 | EXPECT_FALSE(char_reg_type.IsLongOrDoubleTypes()); |
| 130 | EXPECT_FALSE(char_reg_type.IsReferenceTypes()); |
| 131 | EXPECT_TRUE(char_reg_type.IsCategory1Types()); |
| 132 | EXPECT_FALSE(char_reg_type.IsCategory2Types()); |
| 133 | EXPECT_FALSE(char_reg_type.IsBooleanTypes()); |
| 134 | EXPECT_FALSE(char_reg_type.IsByteTypes()); |
| 135 | EXPECT_FALSE(char_reg_type.IsShortTypes()); |
| 136 | EXPECT_TRUE(char_reg_type.IsCharTypes()); |
| 137 | EXPECT_TRUE(char_reg_type.IsIntegralTypes()); |
| 138 | EXPECT_FALSE(char_reg_type.IsFloatTypes()); |
| 139 | EXPECT_FALSE(char_reg_type.IsLongTypes()); |
| 140 | EXPECT_FALSE(char_reg_type.IsDoubleTypes()); |
| 141 | EXPECT_TRUE(char_reg_type.IsArrayIndexTypes()); |
| 142 | |
| 143 | const RegType& short_reg_type = cache.Short(); |
| 144 | EXPECT_FALSE(short_reg_type.IsUnknown()); |
| 145 | EXPECT_FALSE(short_reg_type.IsConflict()); |
| 146 | EXPECT_FALSE(short_reg_type.IsZero()); |
| 147 | EXPECT_FALSE(short_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 148 | EXPECT_FALSE(short_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 149 | EXPECT_FALSE(short_reg_type.IsBoolean()); |
| 150 | EXPECT_FALSE(short_reg_type.IsByte()); |
| 151 | EXPECT_FALSE(short_reg_type.IsChar()); |
| 152 | EXPECT_TRUE(short_reg_type.IsShort()); |
| 153 | EXPECT_FALSE(short_reg_type.IsInteger()); |
| 154 | EXPECT_FALSE(short_reg_type.IsLong()); |
| 155 | EXPECT_FALSE(short_reg_type.IsFloat()); |
| 156 | EXPECT_FALSE(short_reg_type.IsDouble()); |
| 157 | EXPECT_FALSE(short_reg_type.IsReference()); |
| 158 | EXPECT_FALSE(short_reg_type.IsLowHalf()); |
| 159 | EXPECT_FALSE(short_reg_type.IsHighHalf()); |
| 160 | EXPECT_FALSE(short_reg_type.IsLongOrDoubleTypes()); |
| 161 | EXPECT_FALSE(short_reg_type.IsReferenceTypes()); |
| 162 | EXPECT_TRUE(short_reg_type.IsCategory1Types()); |
| 163 | EXPECT_FALSE(short_reg_type.IsCategory2Types()); |
| 164 | EXPECT_FALSE(short_reg_type.IsBooleanTypes()); |
| 165 | EXPECT_FALSE(short_reg_type.IsByteTypes()); |
| 166 | EXPECT_TRUE(short_reg_type.IsShortTypes()); |
| 167 | EXPECT_FALSE(short_reg_type.IsCharTypes()); |
| 168 | EXPECT_TRUE(short_reg_type.IsIntegralTypes()); |
| 169 | EXPECT_FALSE(short_reg_type.IsFloatTypes()); |
| 170 | EXPECT_FALSE(short_reg_type.IsLongTypes()); |
| 171 | EXPECT_FALSE(short_reg_type.IsDoubleTypes()); |
| 172 | EXPECT_TRUE(short_reg_type.IsArrayIndexTypes()); |
| 173 | |
| 174 | const RegType& int_reg_type = cache.Integer(); |
| 175 | EXPECT_FALSE(int_reg_type.IsUnknown()); |
| 176 | EXPECT_FALSE(int_reg_type.IsConflict()); |
| 177 | EXPECT_FALSE(int_reg_type.IsZero()); |
| 178 | EXPECT_FALSE(int_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 179 | EXPECT_FALSE(int_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 180 | EXPECT_FALSE(int_reg_type.IsBoolean()); |
| 181 | EXPECT_FALSE(int_reg_type.IsByte()); |
| 182 | EXPECT_FALSE(int_reg_type.IsChar()); |
| 183 | EXPECT_FALSE(int_reg_type.IsShort()); |
| 184 | EXPECT_TRUE(int_reg_type.IsInteger()); |
| 185 | EXPECT_FALSE(int_reg_type.IsLong()); |
| 186 | EXPECT_FALSE(int_reg_type.IsFloat()); |
| 187 | EXPECT_FALSE(int_reg_type.IsDouble()); |
| 188 | EXPECT_FALSE(int_reg_type.IsReference()); |
| 189 | EXPECT_FALSE(int_reg_type.IsLowHalf()); |
| 190 | EXPECT_FALSE(int_reg_type.IsHighHalf()); |
| 191 | EXPECT_FALSE(int_reg_type.IsLongOrDoubleTypes()); |
| 192 | EXPECT_FALSE(int_reg_type.IsReferenceTypes()); |
| 193 | EXPECT_TRUE(int_reg_type.IsCategory1Types()); |
| 194 | EXPECT_FALSE(int_reg_type.IsCategory2Types()); |
| 195 | EXPECT_FALSE(int_reg_type.IsBooleanTypes()); |
| 196 | EXPECT_FALSE(int_reg_type.IsByteTypes()); |
| 197 | EXPECT_FALSE(int_reg_type.IsShortTypes()); |
| 198 | EXPECT_FALSE(int_reg_type.IsCharTypes()); |
| 199 | EXPECT_TRUE(int_reg_type.IsIntegralTypes()); |
| 200 | EXPECT_FALSE(int_reg_type.IsFloatTypes()); |
| 201 | EXPECT_FALSE(int_reg_type.IsLongTypes()); |
| 202 | EXPECT_FALSE(int_reg_type.IsDoubleTypes()); |
| 203 | EXPECT_TRUE(int_reg_type.IsArrayIndexTypes()); |
| 204 | |
| 205 | const RegType& long_reg_type = cache.Long(); |
| 206 | EXPECT_FALSE(long_reg_type.IsUnknown()); |
| 207 | EXPECT_FALSE(long_reg_type.IsConflict()); |
| 208 | EXPECT_FALSE(long_reg_type.IsZero()); |
| 209 | EXPECT_FALSE(long_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 210 | EXPECT_FALSE(long_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 211 | EXPECT_FALSE(long_reg_type.IsBoolean()); |
| 212 | EXPECT_FALSE(long_reg_type.IsByte()); |
| 213 | EXPECT_FALSE(long_reg_type.IsChar()); |
| 214 | EXPECT_FALSE(long_reg_type.IsShort()); |
| 215 | EXPECT_FALSE(long_reg_type.IsInteger()); |
| 216 | EXPECT_TRUE(long_reg_type.IsLong()); |
| 217 | EXPECT_FALSE(long_reg_type.IsFloat()); |
| 218 | EXPECT_FALSE(long_reg_type.IsDouble()); |
| 219 | EXPECT_FALSE(long_reg_type.IsReference()); |
| 220 | EXPECT_TRUE(long_reg_type.IsLowHalf()); |
| 221 | EXPECT_FALSE(long_reg_type.IsHighHalf()); |
| 222 | EXPECT_TRUE(long_reg_type.IsLongOrDoubleTypes()); |
| 223 | EXPECT_FALSE(long_reg_type.IsReferenceTypes()); |
| 224 | EXPECT_FALSE(long_reg_type.IsCategory1Types()); |
| 225 | EXPECT_TRUE(long_reg_type.IsCategory2Types()); |
| 226 | EXPECT_FALSE(long_reg_type.IsBooleanTypes()); |
| 227 | EXPECT_FALSE(long_reg_type.IsByteTypes()); |
| 228 | EXPECT_FALSE(long_reg_type.IsShortTypes()); |
| 229 | EXPECT_FALSE(long_reg_type.IsCharTypes()); |
| 230 | EXPECT_FALSE(long_reg_type.IsIntegralTypes()); |
| 231 | EXPECT_FALSE(long_reg_type.IsFloatTypes()); |
| 232 | EXPECT_TRUE(long_reg_type.IsLongTypes()); |
| 233 | EXPECT_FALSE(long_reg_type.IsDoubleTypes()); |
| 234 | EXPECT_FALSE(long_reg_type.IsArrayIndexTypes()); |
| 235 | |
| 236 | const RegType& float_reg_type = cache.Float(); |
| 237 | EXPECT_FALSE(float_reg_type.IsUnknown()); |
| 238 | EXPECT_FALSE(float_reg_type.IsConflict()); |
| 239 | EXPECT_FALSE(float_reg_type.IsZero()); |
| 240 | EXPECT_FALSE(float_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 241 | EXPECT_FALSE(float_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 242 | EXPECT_FALSE(float_reg_type.IsBoolean()); |
| 243 | EXPECT_FALSE(float_reg_type.IsByte()); |
| 244 | EXPECT_FALSE(float_reg_type.IsChar()); |
| 245 | EXPECT_FALSE(float_reg_type.IsShort()); |
| 246 | EXPECT_FALSE(float_reg_type.IsInteger()); |
| 247 | EXPECT_FALSE(float_reg_type.IsLong()); |
| 248 | EXPECT_TRUE(float_reg_type.IsFloat()); |
| 249 | EXPECT_FALSE(float_reg_type.IsDouble()); |
| 250 | EXPECT_FALSE(float_reg_type.IsReference()); |
| 251 | EXPECT_FALSE(float_reg_type.IsLowHalf()); |
| 252 | EXPECT_FALSE(float_reg_type.IsHighHalf()); |
| 253 | EXPECT_FALSE(float_reg_type.IsLongOrDoubleTypes()); |
| 254 | EXPECT_FALSE(float_reg_type.IsReferenceTypes()); |
| 255 | EXPECT_TRUE(float_reg_type.IsCategory1Types()); |
| 256 | EXPECT_FALSE(float_reg_type.IsCategory2Types()); |
| 257 | EXPECT_FALSE(float_reg_type.IsBooleanTypes()); |
| 258 | EXPECT_FALSE(float_reg_type.IsByteTypes()); |
| 259 | EXPECT_FALSE(float_reg_type.IsShortTypes()); |
| 260 | EXPECT_FALSE(float_reg_type.IsCharTypes()); |
| 261 | EXPECT_FALSE(float_reg_type.IsIntegralTypes()); |
| 262 | EXPECT_TRUE(float_reg_type.IsFloatTypes()); |
| 263 | EXPECT_FALSE(float_reg_type.IsLongTypes()); |
| 264 | EXPECT_FALSE(float_reg_type.IsDoubleTypes()); |
| 265 | EXPECT_FALSE(float_reg_type.IsArrayIndexTypes()); |
| 266 | |
| 267 | const RegType& double_reg_type = cache.Double(); |
| 268 | EXPECT_FALSE(double_reg_type.IsUnknown()); |
| 269 | EXPECT_FALSE(double_reg_type.IsConflict()); |
| 270 | EXPECT_FALSE(double_reg_type.IsZero()); |
| 271 | EXPECT_FALSE(double_reg_type.IsOne()); |
Ian Rogers | 84fa074 | 2011-10-25 18:13:30 -0700 | [diff] [blame] | 272 | EXPECT_FALSE(double_reg_type.IsLongConstant()); |
Ian Rogers | d81871c | 2011-10-03 13:57:23 -0700 | [diff] [blame] | 273 | EXPECT_FALSE(double_reg_type.IsBoolean()); |
| 274 | EXPECT_FALSE(double_reg_type.IsByte()); |
| 275 | EXPECT_FALSE(double_reg_type.IsChar()); |
| 276 | EXPECT_FALSE(double_reg_type.IsShort()); |
| 277 | EXPECT_FALSE(double_reg_type.IsInteger()); |
| 278 | EXPECT_FALSE(double_reg_type.IsLong()); |
| 279 | EXPECT_FALSE(double_reg_type.IsFloat()); |
| 280 | EXPECT_TRUE(double_reg_type.IsDouble()); |
| 281 | EXPECT_FALSE(double_reg_type.IsReference()); |
| 282 | EXPECT_TRUE(double_reg_type.IsLowHalf()); |
| 283 | EXPECT_FALSE(double_reg_type.IsHighHalf()); |
| 284 | EXPECT_TRUE(double_reg_type.IsLongOrDoubleTypes()); |
| 285 | EXPECT_FALSE(double_reg_type.IsReferenceTypes()); |
| 286 | EXPECT_FALSE(double_reg_type.IsCategory1Types()); |
| 287 | EXPECT_TRUE(double_reg_type.IsCategory2Types()); |
| 288 | EXPECT_FALSE(double_reg_type.IsBooleanTypes()); |
| 289 | EXPECT_FALSE(double_reg_type.IsByteTypes()); |
| 290 | EXPECT_FALSE(double_reg_type.IsShortTypes()); |
| 291 | EXPECT_FALSE(double_reg_type.IsCharTypes()); |
| 292 | EXPECT_FALSE(double_reg_type.IsIntegralTypes()); |
| 293 | EXPECT_FALSE(double_reg_type.IsFloatTypes()); |
| 294 | EXPECT_FALSE(double_reg_type.IsLongTypes()); |
| 295 | EXPECT_TRUE(double_reg_type.IsDoubleTypes()); |
| 296 | EXPECT_FALSE(double_reg_type.IsArrayIndexTypes()); |
| 297 | } |
| 298 | |
| 299 | // TODO: test reference RegType |
| 300 | // TODO: test constant RegType |
| 301 | // TODO: test VerifyAgainst |
| 302 | // TODO: test Merge |
| 303 | // TODO: test Equals |
| 304 | // TODO: test ClassJoin |
| 305 | |
| 306 | } // namespace verifier |
jeffhao | ba5ebb9 | 2011-08-25 17:24:37 -0700 | [diff] [blame] | 307 | } // namespace art |