Remove bitmask.h & .c, since the container is no longer used
This commit is contained in:
@ -2,7 +2,6 @@ add_executable(test_adminusers testadminusers.c)
|
||||
add_executable(test_buffer testbuffer.c)
|
||||
add_executable(test_dcb testdcb.c)
|
||||
add_executable(test_filter testfilter.c)
|
||||
add_executable(test_gwbitmask testgwbitmask.c)
|
||||
add_executable(test_hash testhash.c)
|
||||
add_executable(test_hint testhint.c)
|
||||
add_executable(test_log testlog.c)
|
||||
@ -24,7 +23,6 @@ target_link_libraries(test_adminusers maxscale-common)
|
||||
target_link_libraries(test_buffer maxscale-common)
|
||||
target_link_libraries(test_dcb maxscale-common)
|
||||
target_link_libraries(test_filter maxscale-common)
|
||||
target_link_libraries(test_gwbitmask maxscale-common)
|
||||
target_link_libraries(test_hash maxscale-common)
|
||||
target_link_libraries(test_hint maxscale-common)
|
||||
target_link_libraries(test_log maxscale-common)
|
||||
@ -46,7 +44,6 @@ add_test(TestAdminUsers test_adminusers)
|
||||
add_test(TestBuffer test_buffer)
|
||||
add_test(TestDCB test_dcb)
|
||||
add_test(TestFilter test_filter)
|
||||
add_test(TestBitmask test_gwbitmask)
|
||||
add_test(TestHash test_hash)
|
||||
add_test(TestHint test_hint)
|
||||
add_test(TestLog test_log)
|
||||
|
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 MariaDB Corporation Ab
|
||||
*
|
||||
* Use of this software is governed by the Business Source License included
|
||||
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
|
||||
*
|
||||
* Change Date: 2019-07-01
|
||||
*
|
||||
* On the date above, in accordance with the Business Source License, use
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @verbatim
|
||||
* Revision History
|
||||
*
|
||||
* Date Who Description
|
||||
* 13-10-2014 Martin Brampton Initial implementation
|
||||
*
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
// To ensure that ss_info_assert asserts also when builing in non-debug mode.
|
||||
#if !defined(SS_DEBUG)
|
||||
#define SS_DEBUG
|
||||
#endif
|
||||
#if defined(NDEBUG)
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <maxscale/bitmask.h>
|
||||
|
||||
#include <maxscale/debug.h>
|
||||
|
||||
/**
|
||||
* test1 Create a bitmap and mess around with it
|
||||
*
|
||||
*/
|
||||
static int
|
||||
test1()
|
||||
{
|
||||
static MXS_BITMASK bitmask, another;
|
||||
int i;
|
||||
|
||||
/* Hint tests */
|
||||
ss_dfprintf(stderr,
|
||||
"testgwbitmask : Initialise a bitmask");
|
||||
bitmask_init(&bitmask);
|
||||
for (i = 0; i < MXS_BITMASK_LENGTH; i++)
|
||||
{
|
||||
ss_info_dassert(0 == bitmask_isset(&bitmask, i), "All bits should initially be zero");
|
||||
}
|
||||
ss_info_dassert(0 != bitmask_isallclear(&bitmask), "Should be all clear");
|
||||
ss_dfprintf(stderr, "\t..done\nSet an arbitrary bit.");
|
||||
bitmask_set(&bitmask, 17);
|
||||
bitmask_copy(&another, &bitmask);
|
||||
ss_info_dassert(0 != bitmask_isset(&another, 17), "Test bit should be set");
|
||||
ss_dfprintf(stderr, "\t..done\nClear the arbitrary bit.");
|
||||
bitmask_clear(&bitmask, 17);
|
||||
ss_info_dassert(0 != bitmask_isallclear(&bitmask), "Should be all clear");
|
||||
ss_info_dassert(0 == bitmask_isset(&bitmask, 17), "Test bit should be clear");
|
||||
|
||||
ss_dfprintf(stderr, "\t..done\nFree the bitmask.");
|
||||
bitmask_free(&bitmask);
|
||||
ss_dfprintf(stderr, "\t..done\n");
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
result += test1();
|
||||
|
||||
exit(result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user