summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/167-visit-locks/visit_locks.cc2
-rw-r--r--test/1945-proxy-method-arguments/get_args.cc4
-rw-r--r--test/203-multi-checkpoint/multi_checkpoint.cc4
-rw-r--r--test/305-other-fault-handler/fault_handler.cc4
-rw-r--r--test/616-cha-unloading/cha_unload.cc2
-rw-r--r--test/906-iterate-heap/iterate_heap.cc6
-rw-r--r--test/913-heaps/heaps.cc12
-rw-r--r--test/common/stack_inspect.cc2
-rw-r--r--test/ti-agent/ti_macros.h2
9 files changed, 17 insertions, 21 deletions
diff --git a/test/167-visit-locks/visit_locks.cc b/test/167-visit-locks/visit_locks.cc
index e79c880639..8955f5a08e 100644
--- a/test/167-visit-locks/visit_locks.cc
+++ b/test/167-visit-locks/visit_locks.cc
@@ -42,7 +42,7 @@ extern "C" JNIEXPORT void JNICALL Java_Main_testVisitLocks(JNIEnv*, jclass) {
: StackVisitor(thread, context, StackWalkKind::kIncludeInlinedFrames) {
}
- bool VisitFrame() OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) {
ArtMethod* m = GetMethod();
// Ignore runtime methods.
diff --git a/test/1945-proxy-method-arguments/get_args.cc b/test/1945-proxy-method-arguments/get_args.cc
index 211ae10ab0..859e229d9e 100644
--- a/test/1945-proxy-method-arguments/get_args.cc
+++ b/test/1945-proxy-method-arguments/get_args.cc
@@ -27,7 +27,7 @@ namespace art {
namespace {
// Visit a proxy method Quick frame at a given depth.
-class GetProxyQuickFrameVisitor FINAL : public StackVisitor {
+class GetProxyQuickFrameVisitor final : public StackVisitor {
public:
GetProxyQuickFrameVisitor(art::Thread* target, art::Context* ctx, size_t frame_depth)
REQUIRES_SHARED(art::Locks::mutator_lock_)
@@ -36,7 +36,7 @@ class GetProxyQuickFrameVisitor FINAL : public StackVisitor {
frame_depth_(frame_depth),
quick_frame_(nullptr) {}
- bool VisitFrame() OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) {
if (GetMethod()->IsRuntimeMethod()) {
return true;
}
diff --git a/test/203-multi-checkpoint/multi_checkpoint.cc b/test/203-multi-checkpoint/multi_checkpoint.cc
index 0799b6ed2d..424e9f1a96 100644
--- a/test/203-multi-checkpoint/multi_checkpoint.cc
+++ b/test/203-multi-checkpoint/multi_checkpoint.cc
@@ -28,7 +28,7 @@ struct TestClosure : public Closure {
bool second_run;
bool second_run_interleaved;
- void Run(Thread* self) OVERRIDE {
+ void Run(Thread* self) override {
CHECK_EQ(self, Thread::Current()) << "Not running on target thread!";
if (!first_run_start) {
CHECK(!second_run);
@@ -62,7 +62,7 @@ extern "C" JNIEXPORT void JNICALL Java_Main_checkCheckpointsRun(JNIEnv*, jclass)
}
struct SetupClosure : public Closure {
- void Run(Thread* self) OVERRIDE {
+ void Run(Thread* self) override {
CHECK_EQ(self, Thread::Current()) << "Not running on target thread!";
ScopedObjectAccess soa(self);
MutexLock tscl_mu(self, *Locks::thread_suspend_count_lock_);
diff --git a/test/305-other-fault-handler/fault_handler.cc b/test/305-other-fault-handler/fault_handler.cc
index 093a93f349..93bb148745 100644
--- a/test/305-other-fault-handler/fault_handler.cc
+++ b/test/305-other-fault-handler/fault_handler.cc
@@ -29,7 +29,7 @@
namespace art {
-class TestFaultHandler FINAL : public FaultHandler {
+class TestFaultHandler final : public FaultHandler {
public:
explicit TestFaultHandler(FaultManager* manager)
: FaultHandler(manager),
@@ -51,7 +51,7 @@ class TestFaultHandler FINAL : public FaultHandler {
manager_->RemoveHandler(this);
}
- bool Action(int sig, siginfo_t* siginfo, void* context ATTRIBUTE_UNUSED) OVERRIDE {
+ bool Action(int sig, siginfo_t* siginfo, void* context ATTRIBUTE_UNUSED) override {
CHECK_EQ(sig, SIGSEGV);
CHECK_EQ(reinterpret_cast<uint32_t*>(siginfo->si_addr),
GetTargetPointer()) << "Segfault on unexpected address!";
diff --git a/test/616-cha-unloading/cha_unload.cc b/test/616-cha-unloading/cha_unload.cc
index b17be6bd07..b5166ce1a7 100644
--- a/test/616-cha-unloading/cha_unload.cc
+++ b/test/616-cha-unloading/cha_unload.cc
@@ -35,7 +35,7 @@ class FindPointerAllocatorVisitor : public AllocatorVisitor {
explicit FindPointerAllocatorVisitor(void* ptr) : is_found(false), ptr_(ptr) {}
bool Visit(LinearAlloc* alloc)
- REQUIRES_SHARED(Locks::classlinker_classes_lock_, Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(Locks::classlinker_classes_lock_, Locks::mutator_lock_) override {
is_found = alloc->Contains(ptr_);
return !is_found;
}
diff --git a/test/906-iterate-heap/iterate_heap.cc b/test/906-iterate-heap/iterate_heap.cc
index 57c0274557..2a06a7b9d6 100644
--- a/test/906-iterate-heap/iterate_heap.cc
+++ b/test/906-iterate-heap/iterate_heap.cc
@@ -87,7 +87,7 @@ extern "C" JNIEXPORT jint JNICALL Java_art_Test906_iterateThroughHeapCount(
jint Handle(jlong class_tag ATTRIBUTE_UNUSED,
jlong size ATTRIBUTE_UNUSED,
jlong* tag_ptr ATTRIBUTE_UNUSED,
- jint length ATTRIBUTE_UNUSED) OVERRIDE {
+ jint length ATTRIBUTE_UNUSED) override {
counter++;
if (counter == stop_after) {
return JVMTI_VISIT_ABORT;
@@ -120,7 +120,7 @@ extern "C" JNIEXPORT jint JNICALL Java_art_Test906_iterateThroughHeapData(
jintArray lengths) {
class DataIterationConfig : public IterationConfig {
public:
- jint Handle(jlong class_tag, jlong size, jlong* tag_ptr, jint length) OVERRIDE {
+ jint Handle(jlong class_tag, jlong size, jlong* tag_ptr, jint length) override {
class_tags_.push_back(class_tag);
sizes_.push_back(size);
tags_.push_back(*tag_ptr);
@@ -164,7 +164,7 @@ extern "C" JNIEXPORT void JNICALL Java_art_Test906_iterateThroughHeapAdd(
jint Handle(jlong class_tag ATTRIBUTE_UNUSED,
jlong size ATTRIBUTE_UNUSED,
jlong* tag_ptr,
- jint length ATTRIBUTE_UNUSED) OVERRIDE {
+ jint length ATTRIBUTE_UNUSED) override {
jlong current_tag = *tag_ptr;
if (current_tag != 0) {
*tag_ptr = current_tag + 10;
diff --git a/test/913-heaps/heaps.cc b/test/913-heaps/heaps.cc
index b07554ca46..b0e0f07db8 100644
--- a/test/913-heaps/heaps.cc
+++ b/test/913-heaps/heaps.cc
@@ -41,8 +41,6 @@ namespace Test913Heaps {
using android::base::StringPrintf;
-#define FINAL final
-#define OVERRIDE override
#define UNREACHABLE __builtin_unreachable
extern "C" JNIEXPORT void JNICALL Java_art_Test913_forceGarbageCollection(
@@ -144,7 +142,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test913_followReferences(
jint stop_after,
jint follow_set,
jobject jniRef) {
- class PrintIterationConfig FINAL : public IterationConfig {
+ class PrintIterationConfig final : public IterationConfig {
public:
PrintIterationConfig(jint _stop_after, jint _follow_set)
: counter_(0),
@@ -160,7 +158,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test913_followReferences(
jlong* tag_ptr,
jlong* referrer_tag_ptr,
jint length,
- void* user_data ATTRIBUTE_UNUSED) OVERRIDE {
+ void* user_data ATTRIBUTE_UNUSED) override {
jlong tag = *tag_ptr;
// Ignore any jni-global roots with untagged classes. These can be from the environment,
@@ -303,7 +301,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test913_followReferences(
}
protected:
- std::string PrintArrowType() const OVERRIDE {
+ std::string PrintArrowType() const override {
char* name = nullptr;
if (info_.jni_local.method != nullptr) {
jvmti_env->GetMethodName(info_.jni_local.method, &name, nullptr, nullptr);
@@ -349,7 +347,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test913_followReferences(
}
protected:
- std::string PrintArrowType() const OVERRIDE {
+ std::string PrintArrowType() const override {
char* name = nullptr;
if (info_.stack_local.method != nullptr) {
jvmti_env->GetMethodName(info_.stack_local.method, &name, nullptr, nullptr);
@@ -391,7 +389,7 @@ extern "C" JNIEXPORT jobjectArray JNICALL Java_art_Test913_followReferences(
: Elem(referrer, referree, size, length), string_(string) {}
protected:
- std::string PrintArrowType() const OVERRIDE {
+ std::string PrintArrowType() const override {
return string_;
}
diff --git a/test/common/stack_inspect.cc b/test/common/stack_inspect.cc
index 192274e5ae..97a589fa48 100644
--- a/test/common/stack_inspect.cc
+++ b/test/common/stack_inspect.cc
@@ -77,7 +77,7 @@ struct MethodIsInterpretedVisitor : public StackVisitor {
prev_was_runtime_(true),
require_deoptable_(require_deoptable) {}
- virtual bool VisitFrame() OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) {
+ virtual bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) {
if (goal_ == GetMethod()) {
method_is_interpreted_ = (require_deoptable_ && prev_was_runtime_) || IsShadowFrame();
method_found_ = true;
diff --git a/test/ti-agent/ti_macros.h b/test/ti-agent/ti_macros.h
index d91338324f..a871270dcf 100644
--- a/test/ti-agent/ti_macros.h
+++ b/test/ti-agent/ti_macros.h
@@ -19,8 +19,6 @@
#include "android-base/macros.h"
-#define FINAL final
-#define OVERRIDE override
#define UNREACHABLE __builtin_unreachable
#endif // ART_TEST_TI_AGENT_TI_MACROS_H_