mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-21 19:18:55 +00:00
* init no exception changes * initial test * disable exceptions * more throw handling * minor update * fix linux build break * fix windows/nuphar build break * address cr comments, move #ifdef to ORT_CATCH * address cr comments, move #ifdef to ORT_CATCH * handle return statement in ORT_CATCH * linux build break fix * addressed cr comments, remove ort_catch_end * addressed cr comments, remove ort_catch_end * move mlas to a separated ifdef flag * merge master, move some new code in master to no_exc Co-authored-by: gwang0000 <62914304+gwang0000@users.noreply.github.com>
25 lines
565 B
C++
25 lines
565 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#include "core/session/environment.h"
|
|
#include "gtest/gtest.h"
|
|
#include "test/test_environment.h"
|
|
#include "core/session/onnxruntime_cxx_api.h"
|
|
|
|
int main(int argc, char** argv) {
|
|
int status = 0;
|
|
|
|
ORT_TRY {
|
|
onnxruntime::test::TestEnvironment test_environment{argc, argv};
|
|
|
|
status = RUN_ALL_TESTS();
|
|
}
|
|
ORT_CATCH(const std::exception& ex) {
|
|
ORT_HANDLE_EXCEPTION([&]() {
|
|
std::cerr << ex.what();
|
|
status = -1;
|
|
});
|
|
}
|
|
|
|
return status;
|
|
}
|