Skip to content

Commit

Permalink
Migrate atomics suite to the new test registration framework (#2189)
Browse files Browse the repository at this point in the history
Contributes to #2181
  • Loading branch information
ahesham-arm authored Dec 13, 2024
1 parent 5b7af4b commit 2fe382e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 179 deletions.
34 changes: 3 additions & 31 deletions test_conformance/atomics/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include "harness/compat.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "procs.h"
#include "harness/testHarness.h"

#if !defined(_WIN32)
#include <unistd.h>
#endif

// clang-format off
test_definition test_list[] = {
ADD_TEST( atomic_add ),
ADD_TEST( atomic_sub ),
ADD_TEST( atomic_xchg ),
ADD_TEST( atomic_min ),
ADD_TEST( atomic_max ),
ADD_TEST( atomic_inc ),
ADD_TEST( atomic_dec ),
ADD_TEST( atomic_cmpxchg ),
ADD_TEST( atomic_and ),
ADD_TEST( atomic_or ),
ADD_TEST( atomic_xor ),

ADD_TEST( atomic_add_index ),
ADD_TEST( atomic_add_index_bin ),
};
// clang-format on

const int test_num = ARRAY_SIZE(test_list);
#include "harness/testHarness.h"

int main(int argc, const char *argv[])
{
return runTestHarness(argc, argv, test_num, test_list, false, 0);
return runTestHarness(argc, argv, test_registry::getInstance().num_tests(),
test_registry::getInstance().definitions(), false, 0);
}
51 changes: 0 additions & 51 deletions test_conformance/atomics/procs.h

This file was deleted.

28 changes: 0 additions & 28 deletions test_conformance/atomics/testBase.h

This file was deleted.

Loading

0 comments on commit 2fe382e

Please sign in to comment.