mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 11:08:34 +08:00
65 lines
2.3 KiB
C++
65 lines
2.3 KiB
C++
// Copyright 2006, Google Inc.
|
|
// All rights reserved.
|
|
//
|
|
// Redistribution and use in source and binary forms, with or without
|
|
// modification, are permitted provided that the following conditions are
|
|
// met:
|
|
//
|
|
// * Redistributions of source code must retain the above copyright
|
|
// notice, this list of conditions and the following disclaimer.
|
|
// * Redistributions in binary form must reproduce the above
|
|
// copyright notice, this list of conditions and the following disclaimer
|
|
// in the documentation and/or other materials provided with the
|
|
// distribution.
|
|
// * Neither the name of Google Inc. nor the names of its
|
|
// contributors may be used to endorse or promote products derived from
|
|
// this software without specific prior written permission.
|
|
//
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
#define WIN32_LEAN_AND_MEAN 1
|
|
#endif /*WIN32_LEAN_AND_MEAN*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "awtk.h"
|
|
#include "tkc/mem.h"
|
|
#include "base/idle.h"
|
|
#include "base/system_info.h"
|
|
#include "ext_widgets/ext_widgets.h"
|
|
#include "gtest/gtest.h"
|
|
#include "demos/assets.h"
|
|
#include "tkc/socket_helper.h"
|
|
|
|
GTEST_API_ int main(int argc, char** argv) {
|
|
printf("Running main() from gtest_main.cc\n");
|
|
testing::InitGoogleTest(&argc, argv);
|
|
|
|
return_value_if_fail(platform_prepare() == RET_OK, RET_FAIL);
|
|
tk_socket_init();
|
|
system_info_init(APP_SIMULATOR, NULL, NULL);
|
|
tk_init_internal();
|
|
|
|
assets_init();
|
|
tk_init_assets();
|
|
tk_ext_widgets_init();
|
|
widget_resize(window_manager(), 1024, 800);
|
|
int ret = RUN_ALL_TESTS();
|
|
|
|
tk_deinit_internal();
|
|
tk_socket_deinit();
|
|
|
|
return ret;
|
|
}
|