aboutsummaryrefslogtreecommitdiff
path: root/tests/validate_examples/ValidateExample.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validate_examples/ValidateExample.h')
-rw-r--r--tests/validate_examples/ValidateExample.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/validate_examples/ValidateExample.h b/tests/validate_examples/ValidateExample.h
index cedbe3d0d9..4dd552ab10 100644
--- a/tests/validate_examples/ValidateExample.h
+++ b/tests/validate_examples/ValidateExample.h
@@ -40,14 +40,24 @@ namespace utils
*
* All examples with a validation stage have to inherit from this class.
*/
-class ValidateExample : public Example
+class ValidateExample
{
public:
+ /** Setup the example.
+ *
+ * @param[in] argc Argument count.
+ * @param[in] argv Argument values.
+ */
+ virtual void do_setup(int argc, char **argv) {};
+ /** Run the example. */
+ virtual void do_run() {};
/** Run reference implementation and validate against the target output
*/
virtual void do_validate()
{
}
+ /** Teardown the example. */
+ virtual void do_teardown() {};
/** Print the example parameters
*
* @param[in,out] printer Printer to use to print the parameters
@@ -65,7 +75,7 @@ public:
* @param[in] argv Command line arguments
* @param[in] example Example to run
*/
-int run_example(int argc, char **argv, ValidateExample &example);
+int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example);
} // namespace utils
} // namespace arm_compute