mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
30 lines
518 B
C++
30 lines
518 B
C++
#include <iostream>
|
|
#include <stdexcept>
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <Common/LocalDateTime.h>
|
|
|
|
|
|
void fillStackWithGarbage()
|
|
{
|
|
volatile uint64_t a = 0xAABBCCDDEEFF0011ULL;
|
|
volatile uint64_t b = 0x2233445566778899ULL;
|
|
std::cout << a + b << '\n';
|
|
}
|
|
|
|
void checkComparison()
|
|
{
|
|
LocalDateTime a("2018-07-18 01:02:03");
|
|
LocalDateTime b("2018-07-18 01:02:03");
|
|
|
|
EXPECT_EQ(a, b);
|
|
EXPECT_FALSE(a != b);
|
|
}
|
|
|
|
|
|
TEST(LocalDateTime, Comparison)
|
|
{
|
|
fillStackWithGarbage();
|
|
checkComparison();
|
|
}
|