1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -32,120 +32,113 @@ using namespace execplan;
class TDriver23 : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TDriver23);
CPPUNIT_TEST_SUITE( TDriver23 );
CPPUNIT_TEST(test1);
CPPUNIT_TEST(test2);
CPPUNIT_TEST( test1 );
CPPUNIT_TEST( test2 );
CPPUNIT_TEST_SUITE_END();
CPPUNIT_TEST_SUITE_END();
private:
public:
boost::shared_ptr<CalpontSystemCatalog> syscat;
CalpontSystemCatalog::OID o;
CalpontSystemCatalog::ColType ct;
private:
void setUp()
{
syscat = CalpontSystemCatalog::makeCalpontSystemCatalog();
}
public:
void tearDown()
{
CalpontSystemCatalog::removeCalpontSystemCatalog();
}
boost::shared_ptr<CalpontSystemCatalog> syscat;
CalpontSystemCatalog::OID o;
CalpontSystemCatalog::ColType ct;
void test1()
{
o = 1009;
ct = syscat->colType(o);
/*
cw: 4 dt: int do: 0 lo: 0 to: 0 cp: 8 sc: 0 pr: 10 od: 1009 ct: 0
*/
void setUp()
{
syscat = CalpontSystemCatalog::makeCalpontSystemCatalog();
}
CPPUNIT_ASSERT(ct.columnOID == 1009);
CPPUNIT_ASSERT(ct.colWidth == 4);
CPPUNIT_ASSERT(ct.colPosition == 8);
CPPUNIT_ASSERT(ct.compressionType == 0);
void tearDown()
{
CalpontSystemCatalog::removeCalpontSystemCatalog();
}
o = 2001;
ct = syscat->colType(o);
CPPUNIT_ASSERT(ct.columnOID == 0);
void test1()
{
o = 1009;
ct = syscat->colType(o);
/*
cw: 4 dt: int do: 0 lo: 0 to: 0 cp: 8 sc: 0 pr: 10 od: 1009 ct: 0
*/
ct = syscat->colTypeDct(o);
/*
cw: 65 dt: varchar do: 2001 lo: 2002 to: 2003 cp: 0 sc: 0 pr: 10 od: 1001 ct: 0
*/
CPPUNIT_ASSERT(ct.columnOID == 1001);
CPPUNIT_ASSERT(ct.colWidth == 65);
CPPUNIT_ASSERT(ct.ddn.dictOID == 2001);
CPPUNIT_ASSERT(ct.colPosition == 0);
CPPUNIT_ASSERT(ct.compressionType == 0);
CPPUNIT_ASSERT(ct.columnOID == 1009);
CPPUNIT_ASSERT(ct.colWidth == 4);
CPPUNIT_ASSERT(ct.colPosition == 8);
CPPUNIT_ASSERT(ct.compressionType == 0);
o = 3024;
ct = syscat->colType(o);
/*
int32_t colWidth;
ConstraintType constraintType;
ColDataType colDataType;
DictOID ddn;
boost::any defaultValue;
int32_t colPosition; // temporally put here. may need to have ColInfo struct later
int32_t scale; //number after decimal points
int32_t precision;
int32_t compressionType;
OID columnOID;
cw: 25 dt: char do: 3027 lo: -2147483648 to: -2147483648 cp: 1 sc: 0 pr: 10 od: 3024 comtype: 0
*/
CPPUNIT_ASSERT(ct.columnOID == 3024);
CPPUNIT_ASSERT(ct.colWidth == 25);
CPPUNIT_ASSERT(ct.ddn.dictOID == 3027);
CPPUNIT_ASSERT(ct.colPosition == 1);
CPPUNIT_ASSERT(ct.scale == 0);
CPPUNIT_ASSERT(ct.precision == 10);
CPPUNIT_ASSERT(ct.compressionType == 0);
o = 2001;
ct = syscat->colType(o);
CPPUNIT_ASSERT(ct.columnOID == 0);
o = 3027;
ct = syscat->colType(o);
/*
cw: 0 dt: medint do: 0 lo: 0 to: 0 cp: -1 sc: 0 pr: -1 od: 0 comtype: 0
*/
CPPUNIT_ASSERT(ct.columnOID == 0);
ct = syscat->colTypeDct(o);
/*
cw: 65 dt: varchar do: 2001 lo: 2002 to: 2003 cp: 0 sc: 0 pr: 10 od: 1001 ct: 0
*/
CPPUNIT_ASSERT(ct.columnOID == 1001);
CPPUNIT_ASSERT(ct.colWidth == 65);
CPPUNIT_ASSERT(ct.ddn.dictOID == 2001);
CPPUNIT_ASSERT(ct.colPosition == 0);
CPPUNIT_ASSERT(ct.compressionType == 0);
o = 3024;
ct = syscat->colType(o);
/*
int32_t colWidth;
ConstraintType constraintType;
ColDataType colDataType;
DictOID ddn;
boost::any defaultValue;
int32_t colPosition; // temporally put here. may need to have ColInfo struct later
int32_t scale; //number after decimal points
int32_t precision;
int32_t compressionType;
OID columnOID;
cw: 25 dt: char do: 3027 lo: -2147483648 to: -2147483648 cp: 1 sc: 0 pr: 10 od: 3024 comtype: 0
*/
CPPUNIT_ASSERT(ct.columnOID == 3024);
CPPUNIT_ASSERT(ct.colWidth == 25);
CPPUNIT_ASSERT(ct.ddn.dictOID == 3027);
CPPUNIT_ASSERT(ct.colPosition == 1);
CPPUNIT_ASSERT(ct.scale == 0);
CPPUNIT_ASSERT(ct.precision == 10);
CPPUNIT_ASSERT(ct.compressionType == 0);
o = 3027;
ct = syscat->colType(o);
/*
cw: 0 dt: medint do: 0 lo: 0 to: 0 cp: -1 sc: 0 pr: -1 od: 0 comtype: 0
*/
CPPUNIT_ASSERT(ct.columnOID == 0);
ct = syscat->colTypeDct(o);
CPPUNIT_ASSERT(ct.columnOID == 3024);
CPPUNIT_ASSERT(ct.colWidth == 25);
CPPUNIT_ASSERT(ct.ddn.dictOID == 3027);
CPPUNIT_ASSERT(ct.colPosition == 1);
CPPUNIT_ASSERT(ct.scale == 0);
CPPUNIT_ASSERT(ct.precision == 10);
CPPUNIT_ASSERT(ct.compressionType == 0);
}
void test2()
{
syscat->identity(CalpontSystemCatalog::EC);
test1();
}
ct = syscat->colTypeDct(o);
CPPUNIT_ASSERT(ct.columnOID == 3024);
CPPUNIT_ASSERT(ct.colWidth == 25);
CPPUNIT_ASSERT(ct.ddn.dictOID == 3027);
CPPUNIT_ASSERT(ct.colPosition == 1);
CPPUNIT_ASSERT(ct.scale == 0);
CPPUNIT_ASSERT(ct.precision == 10);
CPPUNIT_ASSERT(ct.compressionType == 0);
}
void test2()
{
syscat->identity(CalpontSystemCatalog::EC);
test1();
}
};
CPPUNIT_TEST_SUITE_REGISTRATION( TDriver23 );
CPPUNIT_TEST_SUITE_REGISTRATION(TDriver23);
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
int main( int argc, char** argv)
int main(int argc, char** argv)
{
CppUnit::TextUi::TestRunner runner;
CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest( registry.makeTest() );
bool wasSuccessful = runner.run( "", false );
return (wasSuccessful ? 0 : 1);
CppUnit::TextUi::TestRunner runner;
CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest(registry.makeTest());
bool wasSuccessful = runner.run("", false);
return (wasSuccessful ? 0 : 1);
}