summaryrefslogtreecommitdiff
path: root/libc/utils/UnitTest/LibcTestMain.cpp
blob: 46e19dd0273653c45d651238d0da1ab424802f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//===-- Main function for implementation of base class for libc unittests -===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "LibcTest.h"

static const char *getTestFilter(int argc, char *argv[]) {
  return argc > 1 ? argv[1] : nullptr;
}

int main(int argc, char *argv[]) {
  const char *TestFilter = getTestFilter(argc, argv);
  return __llvm_libc::testing::Test::runTests(TestFilter);
}