/* * Copyright 2015 (c) Anna Schumaker. */ #include #include static void test_init() { struct queue *q = history_get_queue(); history_init(NULL); test_not_equal((void *)q, NULL); test_equal(queue_has_flag(q, Q_ENABLED), (bool)true); test_equal(queue_has_flag(q, Q_REPEAT), (bool)true); test_equal(queue_has_flag(q, Q_NO_SORT), (bool)true); test_equal(queue_has_flag(q, Q_ADD_FRONT), (bool)true); test_equal(queue_has_flag(q, Q_SAVE_SORT), (bool)false); test_equal(queue_has_flag(q, Q_SAVE_FLAGS), (bool)false); test_equal((void *)q->q_sort, NULL); test_equal(queue_size(q), 0); history_deinit(); } DECLARE_UNIT_TESTS( UNIT_TEST("History Initialization", test_init), );