Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(851)

Unified Diff: src/trusted/validator_arm/baseline_vs_baseline.h

Issue 12095039: Add testing of generated (ARM) baseline decoders using hand-written decoders. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_arm/baseline_vs_baseline.h
===================================================================
--- src/trusted/validator_arm/baseline_vs_baseline.h (revision 0)
+++ src/trusted/validator_arm/baseline_vs_baseline.h (revision 0)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2013 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_BASELINE_VS_BASELINE_h_
+#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_BASELINE_VS_BASELINE_h_
+
+#include "native_client/src/trusted/validator_arm/actual_vs_baseline.h"
+
+namespace nacl_arm_test {
+
+// This file defines a tester that compares the "hand-written" baseline
+// instruction decoders to the "generated" baseline instruction decoders.
+// It does this by testing for each decoded match, whether the generated
+// baseline decoders behave the same. If so, there are interchangable.
+class BaselineVsBaselineTester : public ActualVsBaselineTester {
+ public:
+ BaselineVsBaselineTester(const NamedClassDecoder& gen_baseline,
+ DecoderTester& hand_baseline_tester);
+
+ protected:
+ // We override sanity checks, assuming that they have already been
+ // applied when testing the (hand-coded) baseline decoders against
+ // the baseline decoder.
+ virtual bool DoApplySanityChecks();
+
+ // We override the CheckDefs method to allow us to test that
+ // each baseline implies the other.
+ virtual void CheckDefs();
+};
+
+} // namespace nacl_arm_test
+
+#endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_BASELINE_VS_BASELINE_h_
Property changes on: src/trusted/validator_arm/baseline_vs_baseline.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698