OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. |
| 5 */ |
| 6 |
| 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_BASELINE_VS_BASELINE_h_ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_BASELINE_VS_BASELINE_h_ |
| 9 |
| 10 #include "native_client/src/trusted/validator_arm/actual_vs_baseline.h" |
| 11 |
| 12 namespace nacl_arm_test { |
| 13 |
| 14 // This file defines a tester that compares the "hand-written" baseline |
| 15 // instruction decoders to the "generated" baseline instruction decoders. |
| 16 // It does this by testing for each decoded match, whether the generated |
| 17 // baseline decoders behave the same. If so, there are interchangable. |
| 18 class BaselineVsBaselineTester : public ActualVsBaselineTester { |
| 19 public: |
| 20 BaselineVsBaselineTester(const NamedClassDecoder& gen_baseline, |
| 21 DecoderTester& hand_baseline_tester); |
| 22 |
| 23 protected: |
| 24 // We override sanity checks, assuming that they have already been |
| 25 // applied when testing the (hand-coded) baseline decoders against |
| 26 // the baseline decoder. |
| 27 virtual bool DoApplySanityChecks(); |
| 28 |
| 29 // We override the CheckDefs method to allow us to test that |
| 30 // each baseline implies the other. |
| 31 virtual void CheckDefs(); |
| 32 }; |
| 33 |
| 34 } // namespace nacl_arm_test |
| 35 |
| 36 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_BASELINE_VS_BASELINE_h_ |
OLD | NEW |