summaryrefslogtreecommitdiffstats
path: root/src/test/common/test_hobject.cc
blob: 0bb4aef9ee18d9addea6556426b24ef16fe0c8bb (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "common/hobject.h"
#include "gtest/gtest.h"

TEST(HObject, cmp)
{
  hobject_t c{object_t{"fooc"}, "food", CEPH_NOSNAP, 42, 0, "nspace"};
  hobject_t d{object_t{"food"}, "",     CEPH_NOSNAP, 42, 0, "nspace"};
  hobject_t e{object_t{"fooe"}, "food", CEPH_NOSNAP, 42, 0, "nspace"};
  ASSERT_EQ(-1, cmp(c, d));
  ASSERT_EQ(-1, cmp(d, e));
}