16 #include "tensorflow_serving/core/storage_path.h"
18 #include <gtest/gtest.h>
19 #include "tensorflow/core/lib/core/errors.h"
21 namespace tensorflow {
25 TEST(StoragePathTest, ServableDataEquality) {
26 ServableId id0 = {
"0", 0};
27 ServableId id1 = {
"1", 1};
29 ServableData<StoragePath> a(id0,
"x");
30 ServableData<StoragePath> a2(id0,
"x");
35 ServableData<StoragePath> b(id0,
"y");
36 ServableData<StoragePath> c(id1,
"x");
37 ServableData<StoragePath> d(id0, errors::Unknown(
"error"));
38 for (
const ServableData<StoragePath>& other : {b, c, d}) {
39 EXPECT_TRUE(other == other);
40 EXPECT_FALSE(a == other);
41 EXPECT_FALSE(other == a);