mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/74283 Remove `c10::errors` from torch::deploy and replace them with `multipy::errors` which is effectively a wrapper around `std::runtime_error. Review History can be found with https://github.com/pytorch/pytorch/pull/73456 Test Plan: buck test //caffe2/torch/csrc/deploy:test_deploy Reviewed By: aivanou Differential Revision: D34905174 fbshipit-source-id: 8883fc77dce66c489fa3fa9d14a71d1de1e0cc5f (cherry picked from commit 7fffcdf93648e8141159fe7b1669644db4281bf4)
15 lines
399 B
C++
15 lines
399 B
C++
#include <gtest/gtest.h>
|
|
#include <torch/csrc/deploy/deploy.h>
|
|
#include <torch/torch.h>
|
|
|
|
int main(int argc, char* argv[]) {
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
int rc = RUN_ALL_TESTS();
|
|
return rc;
|
|
}
|
|
|
|
TEST(TorchDeployMissingInterpreter, Throws) {
|
|
// NOLINTNEXTLINE(hicpp-avoid-goto,cppcoreguidelines-avoid-goto)
|
|
EXPECT_THROW(torch::deploy::InterpreterManager(1), std::runtime_error);
|
|
}
|