blob: 718db70bf1a95a46abf7fb946df90bc7e93d9acc [file] [log] [blame]
Yabin Cui294d1e22014-12-07 20:43:37 -08001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <gtest/gtest.h>
Christopher Ferris6d2c0bd2018-08-21 18:13:10 -070018#include <gtest_extras/IsolateMain.h>
Yabin Cui294d1e22014-12-07 20:43:37 -080019
Christopher Ferris6d2c0bd2018-08-21 18:13:10 -070020#include "gtest_utils.h"
Yabin Cui294d1e22014-12-07 20:43:37 -080021
Dimitry Ivanov55437462016-07-20 15:33:07 -070022static int g_argc;
23static char** g_argv;
24static char** g_envp;
Dimitry Ivanovd17a3772016-03-01 13:11:28 -080025
Christopher Ferris6d2c0bd2018-08-21 18:13:10 -070026int GetArgc() {
Dimitry Ivanov55437462016-07-20 15:33:07 -070027 return g_argc;
28}
29
Christopher Ferris6d2c0bd2018-08-21 18:13:10 -070030char** GetArgv() {
Dimitry Ivanov55437462016-07-20 15:33:07 -070031 return g_argv;
32}
33
Christopher Ferris6d2c0bd2018-08-21 18:13:10 -070034char** GetEnvp() {
Dimitry Ivanov55437462016-07-20 15:33:07 -070035 return g_envp;
36}
37
Dimitry Ivanov55437462016-07-20 15:33:07 -070038int main(int argc, char** argv, char** envp) {
Dimitry Ivanov55437462016-07-20 15:33:07 -070039 g_argc = argc;
40 g_argv = argv;
41 g_envp = envp;
Yabin Cuibe837362015-01-02 18:45:37 -080042
Christopher Ferris6d2c0bd2018-08-21 18:13:10 -070043 return IsolateMain(argc, argv, envp);
Yabin Cui5e235c82017-11-16 16:20:28 -080044}