This source file includes following definitions.
- TEST_F
- TEST_F
- TEST_F
#include "sync/api/attachments/attachment.h"
#include <string>
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
namespace {
}
class AttachmentIdTest : public testing::Test {};
TEST_F(AttachmentIdTest, Create_IsUnique) {
AttachmentId id1 = AttachmentId::Create();
AttachmentId id2 = AttachmentId::Create();
EXPECT_NE(id1, id2);
}
TEST_F(AttachmentIdTest, OperatorEqual) {
AttachmentId id1 = AttachmentId::Create();
AttachmentId id2(id1);
EXPECT_EQ(id1, id2);
}
TEST_F(AttachmentIdTest, OperatorLess) {
AttachmentId id1 = AttachmentId::Create();
EXPECT_FALSE(id1 < id1);
AttachmentId id2 = AttachmentId::Create();
EXPECT_FALSE(id1 < id1);
EXPECT_NE(id1, id2);
if (id1 < id2) {
EXPECT_FALSE(id2 < id1);
} else {
EXPECT_TRUE(id2 < id1);
}
}
}