srcs = ["arena_planner_test.cc"],
deps = [
":arena_planner",
- "//tensorflow/contrib/lite/testing:util",
- "//tensorflow/core:lib",
"@com_google_googletest//:gtest",
],
)
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-#include "tensorflow/contrib/lite/testing/util.h"
-#include "tensorflow/core/platform/logging.h"
namespace tflite {
namespace {
} // namespace tflite
int main(int argc, char** argv) {
- ::tflite::LogToStderr();
+ // ::tflite::LogToStderr();
+ FLAGS_logtostderr = true;
+
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
"//tensorflow/contrib/lite:string_util",
"//tensorflow/contrib/lite/schema:schema_fbs",
"//tensorflow/contrib/lite/testing:util",
- "//tensorflow/core:framework_lite",
"@com_google_googletest//:gtest",
"@flatbuffers",
],
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include <string>
-#include <vector>
-
+#include "tensorflow/contrib/lite/tools/verifier.h"
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/util.h"
#include <gtest/gtest.h>
#include "tensorflow/contrib/lite/error_reporter.h"
#include "tensorflow/contrib/lite/schema/schema_generated.h"
#include "tensorflow/contrib/lite/testing/util.h"
-#include "tensorflow/contrib/lite/tools/verifier.h"
#include "tensorflow/contrib/lite/version.h"
-#include "tensorflow/core/framework/numeric_types.h"
namespace tflite {
}
TEST(VerifyModel, TestCorruptedData) {
- std::string model = "123";
+ string model = "123";
ASSERT_FALSE(Verify(model.data(), model.size(), /*error_reporter=*/nullptr));
}
/*subgraphs=*/0, /*description=*/0, /*buffers=*/0);
::tflite::FinishModelBuffer(builder, model);
- std::string model_content(reinterpret_cast<char*>(builder.GetBufferPointer()),
- builder.GetSize());
+ string model_content(reinterpret_cast<char*>(builder.GetBufferPointer()),
+ builder.GetSize());
for (int i = 0; i < model_content.size(); i++) {
model_content[i] = (model_content[i] + 137) % 255;
EXPECT_FALSE(Verify(model_content.data(), model_content.size(),