summaryrefslogtreecommitdiff
path: root/runtime/dex_instruction_test.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-07-01 20:27:06 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-07-01 20:27:07 +0000
commit01b2129de3e182b79aa820e71fc7fa1ef42f2d35 (patch)
tree26b3fd83775e795c307cf24f9ec8c3ca86329c46 /runtime/dex_instruction_test.cc
parentea725ec1b5b9a594842dde02b247f4707ee0c93a (diff)
parentb1f3753d890e17b7b0d4e2779e8dfd8aa5bf0e2d (diff)
Merge "Added index type of dex byte instructions."
Diffstat (limited to 'runtime/dex_instruction_test.cc')
-rw-r--r--runtime/dex_instruction_test.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/runtime/dex_instruction_test.cc b/runtime/dex_instruction_test.cc
new file mode 100644
index 0000000000..671ac0e52b
--- /dev/null
+++ b/runtime/dex_instruction_test.cc
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "dex_instruction-inl.h"
+#include "gtest/gtest.h"
+
+namespace art {
+
+TEST(StaticGetters, PropertiesOfNopTest) {
+ Instruction::Code nop = Instruction::NOP;
+ EXPECT_STREQ("nop", Instruction::Name(nop));
+ EXPECT_EQ(Instruction::k10x, Instruction::FormatOf(nop));
+ EXPECT_EQ(Instruction::kIndexNone, Instruction::IndexTypeOf(nop));
+ EXPECT_EQ(Instruction::kContinue, Instruction::FlagsOf(nop));
+ EXPECT_EQ(Instruction::kVerifyNone, Instruction::VerifyFlagsOf(nop));
+}
+
+} // namespace art