blob: 68d0079f39fad98b478ca65e4362cfe4c529d7ef [file] [log] [blame]
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
#include <string>
#include <map>
class ViEAutoTestMain {
// Runs the test according to the specified arguments.
// Pass in --automated to run in automated mode; interactive
// mode is default. All usual googletest flags also apply.
int RunTests(int argc, char** argv);
std::map<int, std::string> index_to_test_method_map_;
static const int kInvalidChoice = -1;
// Starts interactive mode.
int RunInteractiveMode();
// Prompts the user for a specific test method in the provided test case.
// Returns 0 on success, nonzero otherwise.
int RunSpecificTestCaseIn(const std::string test_case_name);
// Asks the user for a particular test case to run.
int AskUserForTestCase();
// Retrieves a number from the user in the interval
// [min_allowed, max_allowed]. Returns kInvalidChoice on failure.
int AskUserForNumber(int min_allowed, int max_allowed);
// Runs all tests matching the provided filter. * are wildcards.
// Returns the test runner result (0 == OK).
int RunTestMatching(const std::string test_case,
const std::string test_method);
// Runs a non-gtest test case. Choice must be [7,9]. Returns 0 on success.
int RunSpecialTestCase(int choice);