Fix develop build failures
The macro in testrules.cc needed to be chagned to use string literals to work correctly with uncrustify. Also change <cmath> to <math.h> in C headers.
This commit is contained in:
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include <maxscale/cdefs.h>
|
#include <maxscale/cdefs.h>
|
||||||
|
|
||||||
#include <cmath>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
20
server/modules/filter/cache/test/testrules.cc
vendored
20
server/modules/filter/cache/test/testrules.cc
vendored
@ -62,21 +62,21 @@ struct user_test_case
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define USER_TEST_CASE(op_from, from, op_to, to) \
|
#define USER_TEST_CASE(op_from, from, op_to, to) \
|
||||||
{"{ \"use\": [ { \"attribute\": \"user\", \"op\": \"" #op_from "\", \"value\": \"" #from "\" } ] }", \
|
{"{ \"use\": [ { \"attribute\": \"user\", \"op\": \"" op_from "\", \"value\": \"" from "\" } ] }", \
|
||||||
{op_to, #to}}
|
{op_to, to}}
|
||||||
|
|
||||||
#define COLUMN_
|
#define COLUMN_
|
||||||
|
|
||||||
const struct user_test_case user_test_cases[] =
|
const struct user_test_case user_test_cases[] =
|
||||||
{
|
{
|
||||||
USER_TEST_CASE( =, bob, CACHE_OP_LIKE, bob@.*),
|
USER_TEST_CASE("=", "bob", CACHE_OP_LIKE, "bob@.*"),
|
||||||
USER_TEST_CASE( =, 'bob', CACHE_OP_LIKE, bob@.*),
|
USER_TEST_CASE("=", "'bob'", CACHE_OP_LIKE, "bob@.*"),
|
||||||
USER_TEST_CASE( =, bob@ %, CACHE_OP_LIKE, bob@.*),
|
USER_TEST_CASE("=", "bob@%", CACHE_OP_LIKE, "bob@.*"),
|
||||||
USER_TEST_CASE( =, 'bob' @'%.52', CACHE_OP_LIKE, bob@.*\ \ .52),
|
USER_TEST_CASE("=", "'bob'@'%.52'", CACHE_OP_LIKE, "bob@.*\\.52"),
|
||||||
USER_TEST_CASE( =, bob@127 .0 .0 .1, CACHE_OP_EQ, bob@127 .0 .0 .1),
|
USER_TEST_CASE("=", "bob@127.0.0.1", CACHE_OP_EQ, "bob@127.0.0.1"),
|
||||||
USER_TEST_CASE( =, b * b@127 .0 .0 .1, CACHE_OP_EQ, b * b@127 .0 .0 .1),
|
USER_TEST_CASE("=", "b*b@127.0.0.1", CACHE_OP_EQ, "b*b@127.0.0.1"),
|
||||||
USER_TEST_CASE( =, b * b@ % .0 .0 .1, CACHE_OP_LIKE, b \ \ * b@.*\ \ .0 \ \ .0 \ \ .1),
|
USER_TEST_CASE("=", "b*b@%.0.0.1", CACHE_OP_LIKE, "b\\*b@.*\\.0\\.0\\.1"),
|
||||||
USER_TEST_CASE( =, b * b@ % .0.% .1, CACHE_OP_LIKE, b \ \ * b@.*\ \ .0 \ \..*\ \ .1),
|
USER_TEST_CASE("=", "b*b@%.0.%.1", CACHE_OP_LIKE, "b\\*b@.*\\.0\\..*\\.1"),
|
||||||
};
|
};
|
||||||
|
|
||||||
const size_t n_user_test_cases = sizeof(user_test_cases) / sizeof(user_test_cases[0]);
|
const size_t n_user_test_cases = sizeof(user_test_cases) / sizeof(user_test_cases[0]);
|
||||||
|
Reference in New Issue
Block a user