xref: /aosp_15_r20/external/executorch/extension/benchmark/apple/Benchmark/TestUtils/DynamicTestCase.h (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #import <XCTest/XCTest.h>
10 
11 /**
12  * DynamicTestCase is a subclass of XCTestCase that allows dynamic creation of
13  * test methods. Subclasses should override the `+dynamicTests` method to
14  * provide a dictionary of test names and corresponding test blocks.
15  */
16 @interface DynamicTestCase : XCTestCase
17 
18 /**
19  * Returns a dictionary mapping test names to test blocks.
20  * Subclasses should override this method to provide dynamic tests.
21  */
22 + (NSDictionary<NSString *, void (^)(XCTestCase *)> *)dynamicTests;
23 
24 @end
25