Exemplo n.º 1
0
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("BACnet Date Time", NULL);
    /* individual tests */
    rc = ct_addTestFunction(pTest, testBACnetDate);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetTime);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTime);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDayOfWeek);
    assert(rc);
    rc = ct_addTestFunction(pTest, testDateEpoch);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTimeSeconds);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTimeAdd);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTimeWildcard);
    assert(rc);
    rc = ct_addTestFunction(pTest, testDatetimeCodec);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);
    ct_destroy(pTest);

    return 0;
}
Exemplo n.º 2
0
void testBACnetDeviceObjectPropertyReference(
    Test * pTest)
{
    bool rc;

    /* individual tests */
    rc = ct_addTestFunction(pTest, testDevIdPropRef);
    assert(rc);
    rc = ct_addTestFunction(pTest, testDevIdRef);
    assert(rc);
}
Exemplo n.º 3
0
/* test access of a lot of entries */
void testKeyList(
    Test * pTest)
{
    bool rc;

    /* individual tests */
    rc = ct_addTestFunction(pTest, testKeyListFIFO);
    assert(rc);
    rc = ct_addTestFunction(pTest, testKeyListFILO);
    assert(rc);
    rc = ct_addTestFunction(pTest, testKeyListDataKey);
    assert(rc);
    rc = ct_addTestFunction(pTest, testKeyListDataIndex);
    assert(rc);
    rc = ct_addTestFunction(pTest, testKeyListLarge);
    assert(rc);
}
Exemplo n.º 4
0
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("BACnet NPDU", NULL);
    /* individual tests */
    rc = ct_addTestFunction(pTest, testNPDU1);
    assert(rc);
    rc = ct_addTestFunction(pTest, testNPDU2);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);
    ct_destroy(pTest);

    return 0;
}
Exemplo n.º 5
0
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("BACnet ReadPropertyMultiple", NULL);
    /* individual tests */
    rc = ct_addTestFunction(pTest, testReadPropertyMultiple);
    assert(rc);
    rc = ct_addTestFunction(pTest, testReadPropertyMultipleAck);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);
    ct_destroy(pTest);

    return 0;
}
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("Ring Buffer", NULL);

    /* individual tests */
    rc = ct_addTestFunction(pTest, testRingBufSize16);
    assert(rc);
    rc = ct_addTestFunction(pTest, testRingBufSize32);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);

    ct_destroy(pTest);

    return 0;
}
Exemplo n.º 7
0
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("BACnet PrivateTransfer", NULL);
    /* individual tests */
    rc = ct_addTestFunction(pTest, test_Private_Transfer_Request);
    assert(rc);
    rc = ct_addTestFunction(pTest, test_Private_Transfer_Ack);
    assert(rc);
    rc = ct_addTestFunction(pTest, test_Private_Transfer_Error);
    assert(rc);
    rc = ct_addTestFunction(pTest, test_Unconfirmed_Private_Transfer_Request);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);
    ct_destroy(pTest);

    return 0;
}
Exemplo n.º 8
0
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("BACnet Time Stamp", NULL);
    /* individual tests */
    rc = ct_addTestFunction(pTest, testTimestampSequence);
    assert(rc);

    rc = ct_addTestFunction(pTest, testTimestampTime);
    assert(rc);

    rc = ct_addTestFunction(pTest, testTimestampTimeDate);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);
    ct_destroy(pTest);

    return 0;
}
int main(
    int argc,
    char *argv[])
{
    Test *pTest;
    bool rc;

    pTest = ct_create("BACnet Life Safety Operation", NULL);
    /* individual tests */
    rc = ct_addTestFunction(pTest, testLSO);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);
    ct_destroy(pTest);

    return 0;
}
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("filename remove path", NULL);

    /* individual tests */
    rc = ct_addTestFunction(pTest, testFilename);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);

    ct_destroy(pTest);

    return 0;
}
Exemplo n.º 11
0
int main(
    void)
{
    Test *pTest;
    bool rc;

    pTest = ct_create("Memory Copy", NULL);

    /* individual tests */
    rc = ct_addTestFunction(pTest, test_memcopy);
    assert(rc);

    ct_setStream(pTest, stdout);
    ct_run(pTest);
    (void) ct_report(pTest);

    ct_destroy(pTest);

    return 0;
}
Exemplo n.º 12
0
void testDateTime(
    Test * pTest)
{
    bool rc;

    /* individual tests */
    rc = ct_addTestFunction(pTest, testBACnetDate);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetTime);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTime);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDayOfWeek);
    assert(rc);
    rc = ct_addTestFunction(pTest, testDateEpoch);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTimeSeconds);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTimeAdd);
    assert(rc);
    rc = ct_addTestFunction(pTest, testBACnetDateTimeWildcard);
    assert(rc);
    rc = ct_addTestFunction(pTest, testDatetimeCodec);
    assert(rc);
    rc = ct_addTestFunction(pTest, testDayOfYear);
    assert(rc);
    rc = ct_addTestFunction(pTest, testWildcardDateTime);
    assert(rc);
}