Пример #1
0
CUNIT_TEST(DBSuite, EagleDbParser_lastError)
{
    CUNIT_VERIFY_NULL(EagleDbParser_lastError(NULL));

    EagleDbParser *parser = EagleDbParser_New();
    CUNIT_VERIFY_NULL(EagleDbParser_lastError(parser));
    EagleDbParser_Delete(parser);
}
Пример #2
0
CUNIT_TEST(DBSuite, EagleDbSqlValue_getVarchar)
{
    EagleDbSqlValue *value = EagleDbSqlValue_NewWithFloat(123.456);
    EagleBoolean success;
    CUNIT_VERIFY_NULL(EagleDbSqlValue_getVarchar(value, &success));
    CUNIT_VERIFY_EQUAL_INT(success, EagleFalse);
    EagleDbSqlValue_Delete(value);
}
Пример #3
0
CUNIT_TEST(MemorySuite, EaglePageProviderSingle_NewFloat)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EaglePageProviderSingle_NewFloat.1");
    
    CUNIT_VERIFY_NULL(EaglePageProviderSingle_NewFloat(123.0, 1, "name"));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #4
0
CUNIT_TEST(MemorySuite, EagleDbSqlFunctionExpression_New)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EagleDbSqlFunctionExpression_New.1");
    
    CUNIT_VERIFY_NULL(EagleDbSqlFunctionExpression_New(NULL, NULL));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #5
0
CUNIT_TEST(MemorySuite, EaglePage_AllocFloat)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EaglePage_AllocFloat.1");
    
    CUNIT_VERIFY_NULL(EaglePage_AllocFloat(1));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #6
0
CUNIT_TEST(MemorySuite, EagleDbSqlValue_NewWithFloat)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EagleDbSqlValue_NewWithFloat.1");
    
    CUNIT_VERIFY_NULL(EagleDbSqlValue_NewWithFloat(123.0));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #7
0
CUNIT_TEST(MemorySuite, EaglePlanBufferProvider_NewWithValue)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EaglePlanBufferProvider_NewWithValue.1");
    
    CUNIT_VERIFY_NULL(EaglePlanBufferProvider_NewWithValue(0, NULL));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #8
0
CUNIT_TEST(MemorySuite, EagleDbSqlCastExpression_toString)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EagleDbSqlCastExpression_toString.1");
    
    CUNIT_VERIFY_NULL(EagleDbSqlCastExpression_toString(NULL));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #9
0
CUNIT_TEST(MemorySuite, EagleDbSqlCastExpression_New)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EagleDbSqlCastExpression_New.1");
    
    CUNIT_VERIFY_NULL(EagleDbSqlCastExpression_New(NULL, EagleDataTypeInteger));
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #10
0
CUNIT_TEST(MemorySuite, EaglePage_CopyFloat_)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EaglePage_CopyFloat_.1");
    
    EaglePage *page = EaglePage_AllocFloat(1);
    CUNIT_VERIFY_NULL(EaglePage_RealCopyFloat_(page));
    EaglePage_Delete(page);
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #11
0
CUNIT_TEST(MemorySuite, EaglePageProviderSingle_nextPage_3)
{
    EagleMemory_MockInit();
    EagleMemory_Mock("EaglePageProviderSingle_nextPage.3");
    
    EaglePageProviderSingle *single = EaglePageProviderSingle_NewFloat(123.0, 1, "name");
    CUNIT_VERIFY_NULL(EaglePageProviderSingle_nextPage(single));
    EaglePageProviderSingle_Delete(single);
    
    CUNIT_ASSERT_EQUAL_INT(EagleMemory_GetMockInvocations(), 1);
    EagleMemory_MockFinish();
}
Пример #12
0
CUNIT_TEST(MainSuite, EaglePageProviderArray_nextPage, Int)
{
    EaglePageProviderArray *epp = EaglePageProviderArray_New(EagleDataTypeInteger, NULL, 0, 1, "name");
    CUNIT_VERIFY_NULL(EaglePageProviderArray_nextPage(epp));
    EaglePageProvider_Delete((EaglePageProvider*) epp);
}