mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-09-15 16:57:19 +02:00
Update WIP discord and some vendors.
CPR has features disabled and PCRE is fully disabled until updated to new code.
This commit is contained in:
33
vendor/ZMQ/unittests/unittest_curve_encoding.cpp
vendored
33
vendor/ZMQ/unittests/unittest_curve_encoding.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include "../tests/testutil_unity.hpp"
|
||||
|
||||
@@ -84,13 +67,14 @@ void test_roundtrip (zmq::msg_t *msg_)
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY (&original[0], msg_->data (),
|
||||
original.size ());
|
||||
}
|
||||
#else
|
||||
TEST_IGNORE_MESSAGE ("CURVE support is disabled");
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_roundtrip_empty ()
|
||||
{
|
||||
#ifndef ZMQ_HAVE_CURVE
|
||||
TEST_IGNORE_MESSAGE ("CURVE support is disabled");
|
||||
#endif
|
||||
zmq::msg_t msg;
|
||||
msg.init ();
|
||||
|
||||
@@ -101,6 +85,9 @@ void test_roundtrip_empty ()
|
||||
|
||||
void test_roundtrip_small ()
|
||||
{
|
||||
#ifndef ZMQ_HAVE_CURVE
|
||||
TEST_IGNORE_MESSAGE ("CURVE support is disabled");
|
||||
#endif
|
||||
zmq::msg_t msg;
|
||||
msg.init_size (32);
|
||||
memcpy (msg.data (), "0123456789ABCDEF0123456789ABCDEF", 32);
|
||||
@@ -112,6 +99,9 @@ void test_roundtrip_small ()
|
||||
|
||||
void test_roundtrip_large ()
|
||||
{
|
||||
#ifndef ZMQ_HAVE_CURVE
|
||||
TEST_IGNORE_MESSAGE ("CURVE support is disabled");
|
||||
#endif
|
||||
zmq::msg_t msg;
|
||||
msg.init_size (2048);
|
||||
for (size_t pos = 0; pos < 2048; pos += 32) {
|
||||
@@ -126,6 +116,9 @@ void test_roundtrip_large ()
|
||||
|
||||
void test_roundtrip_empty_more ()
|
||||
{
|
||||
#ifndef ZMQ_HAVE_CURVE
|
||||
TEST_IGNORE_MESSAGE ("CURVE support is disabled");
|
||||
#endif
|
||||
zmq::msg_t msg;
|
||||
msg.init ();
|
||||
msg.set_flags (zmq::msg_t::more);
|
||||
|
19
vendor/ZMQ/unittests/unittest_ip_resolver.cpp
vendored
19
vendor/ZMQ/unittests/unittest_ip_resolver.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include <unity.h>
|
||||
#include "../src/macros.hpp"
|
||||
|
44
vendor/ZMQ/unittests/unittest_mtrie.cpp
vendored
44
vendor/ZMQ/unittests/unittest_mtrie.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include "../tests/testutil.hpp"
|
||||
|
||||
@@ -81,6 +64,8 @@ void test_add_single_entry_match_exact ()
|
||||
bool res = mtrie.add (test_name, getlen (test_name), &pipe);
|
||||
TEST_ASSERT_TRUE (res);
|
||||
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
int count = 0;
|
||||
mtrie.match (test_name, getlen (test_name), mtrie_count, &count);
|
||||
TEST_ASSERT_EQUAL_INT (1, count);
|
||||
@@ -96,9 +81,11 @@ void test_add_single_entry_twice_match_exact ()
|
||||
|
||||
bool res = mtrie.add (test_name, getlen (test_name), &pipe);
|
||||
TEST_ASSERT_TRUE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
res = mtrie.add (test_name, getlen (test_name), &pipe);
|
||||
TEST_ASSERT_FALSE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
int count = 0;
|
||||
mtrie.match (test_name, getlen (test_name), mtrie_count, &count);
|
||||
@@ -115,9 +102,11 @@ void test_add_two_entries_with_same_name_match_exact ()
|
||||
|
||||
bool res = mtrie.add (test_name, getlen (test_name), &pipe_1);
|
||||
TEST_ASSERT_TRUE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
res = mtrie.add (test_name, getlen (test_name), &pipe_2);
|
||||
TEST_ASSERT_FALSE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
int count = 0;
|
||||
mtrie.match (test_name, getlen (test_name), mtrie_count, &count);
|
||||
@@ -136,9 +125,11 @@ void test_add_two_entries_match_prefix_and_exact ()
|
||||
|
||||
bool res = mtrie.add (test_name_prefix, getlen (test_name_prefix), &pipe_1);
|
||||
TEST_ASSERT_TRUE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
res = mtrie.add (test_name_full, getlen (test_name_full), &pipe_2);
|
||||
TEST_ASSERT_TRUE (res);
|
||||
TEST_ASSERT_EQUAL_INT (2, mtrie.num_prefixes ());
|
||||
|
||||
int count = 0;
|
||||
mtrie.match (test_name_full, getlen (test_name_full), mtrie_count, &count);
|
||||
@@ -153,9 +144,11 @@ void test_add_rm_single_entry_match_exact ()
|
||||
reinterpret_cast<zmq::generic_mtrie_t<int>::prefix_t> ("foo");
|
||||
|
||||
mtrie.add (test_name, getlen (test_name), &pipe);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
zmq::generic_mtrie_t<int>::rm_result res =
|
||||
mtrie.rm (test_name, getlen (test_name), &pipe);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::last_value_removed, res);
|
||||
TEST_ASSERT_EQUAL_INT (0, mtrie.num_prefixes ());
|
||||
|
||||
int count = 0;
|
||||
mtrie.match (test_name, getlen (test_name), mtrie_count, &count);
|
||||
@@ -169,6 +162,7 @@ void test_rm_nonexistent_0_size_empty ()
|
||||
|
||||
zmq::generic_mtrie_t<int>::rm_result res = mtrie.rm (0, 0, &pipe);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::not_found, res);
|
||||
TEST_ASSERT_EQUAL_INT (0, mtrie.num_prefixes ());
|
||||
}
|
||||
|
||||
void test_rm_nonexistent_empty ()
|
||||
@@ -181,6 +175,7 @@ void test_rm_nonexistent_empty ()
|
||||
zmq::generic_mtrie_t<int>::rm_result res =
|
||||
mtrie.rm (test_name, getlen (test_name), &pipe);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::not_found, res);
|
||||
TEST_ASSERT_EQUAL_INT (0, mtrie.num_prefixes ());
|
||||
|
||||
int count = 0;
|
||||
mtrie.match (test_name, getlen (test_name), mtrie_count, &count);
|
||||
@@ -197,10 +192,12 @@ void test_add_and_rm_other (const char *add_name_, const char *rm_name_)
|
||||
reinterpret_cast<zmq::generic_mtrie_t<int>::prefix_t> (rm_name_);
|
||||
|
||||
mtrie.add (add_name_data, getlen (add_name_data), &addpipe);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
zmq::generic_mtrie_t<int>::rm_result res =
|
||||
mtrie.rm (rm_name_data, getlen (rm_name_data), &rmpipe);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::not_found, res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie.num_prefixes ());
|
||||
|
||||
{
|
||||
int count = 0;
|
||||
@@ -249,7 +246,9 @@ void add_indexed_expect_unique (zmq::generic_mtrie_t<int> &mtrie_,
|
||||
reinterpret_cast<zmq::generic_mtrie_t<int>::prefix_t> (names_[i_]);
|
||||
|
||||
bool res = mtrie_.add (name_data, getlen (name_data), &pipes_[i_]);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::last_value_removed, res);
|
||||
TEST_ASSERT_EQUAL (
|
||||
zmq::generic_mtrie_t<int>::last_value_removed,
|
||||
res); // FIXME asserting equality between enum and bool? I think first arg for macro should be "true"
|
||||
}
|
||||
|
||||
void test_rm_nonexistent_between ()
|
||||
@@ -260,6 +259,7 @@ void test_rm_nonexistent_between ()
|
||||
zmq::generic_mtrie_t<int> mtrie;
|
||||
add_indexed_expect_unique (mtrie, pipes, names, 0);
|
||||
add_indexed_expect_unique (mtrie, pipes, names, 2);
|
||||
TEST_ASSERT_EQUAL_INT (2, mtrie.num_prefixes ());
|
||||
|
||||
const zmq::generic_mtrie_t<int>::prefix_t name_data =
|
||||
reinterpret_cast<zmq::generic_mtrie_t<int>::prefix_t> (names[1]);
|
||||
@@ -267,6 +267,7 @@ void test_rm_nonexistent_between ()
|
||||
zmq::generic_mtrie_t<int>::rm_result res =
|
||||
mtrie.rm (name_data, getlen (name_data), &pipes[1]);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::not_found, res);
|
||||
TEST_ASSERT_EQUAL_INT (2, mtrie.num_prefixes ());
|
||||
}
|
||||
|
||||
template <size_t N>
|
||||
@@ -277,6 +278,7 @@ void add_entries (zmq::generic_mtrie_t<int> &mtrie_,
|
||||
for (size_t i = 0; i < N; ++i) {
|
||||
add_indexed_expect_unique (mtrie_, pipes_, names_, i);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT (N, mtrie_.num_prefixes ());
|
||||
}
|
||||
|
||||
void test_add_multiple ()
|
||||
@@ -306,6 +308,7 @@ void test_add_multiple_reverse ()
|
||||
add_indexed_expect_unique (mtrie, pipes, names,
|
||||
static_cast<size_t> (i));
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT (3, mtrie.num_prefixes ());
|
||||
|
||||
for (size_t i = 0; i < 3; ++i) {
|
||||
const zmq::generic_mtrie_t<int>::prefix_t name_data =
|
||||
@@ -330,6 +333,7 @@ template <size_t N> void add_and_rm_entries (const char *(&names_)[N])
|
||||
mtrie.rm (name_data, getlen (name_data), &pipes[i]);
|
||||
TEST_ASSERT_EQUAL (zmq::generic_mtrie_t<int>::last_value_removed, res);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT (0, mtrie.num_prefixes ());
|
||||
}
|
||||
|
||||
void test_rm_multiple_in_order ()
|
||||
@@ -394,8 +398,10 @@ void add_duplicate_entry (zmq::generic_mtrie_t<int> &mtrie_, int (&pipes_)[2])
|
||||
|
||||
bool res = mtrie_.add (name_data, getlen (name_data), &pipes_[0]);
|
||||
TEST_ASSERT_TRUE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie_.num_prefixes ());
|
||||
res = mtrie_.add (name_data, getlen (name_data), &pipes_[1]);
|
||||
TEST_ASSERT_FALSE (res);
|
||||
TEST_ASSERT_EQUAL_INT (1, mtrie_.num_prefixes ());
|
||||
}
|
||||
|
||||
void test_rm_with_callback_duplicate ()
|
||||
|
19
vendor/ZMQ/unittests/unittest_poller.cpp
vendored
19
vendor/ZMQ/unittests/unittest_poller.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include "../tests/testutil.hpp"
|
||||
|
||||
|
19
vendor/ZMQ/unittests/unittest_radix_tree.cpp
vendored
19
vendor/ZMQ/unittests/unittest_radix_tree.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include "../tests/testutil.hpp"
|
||||
|
||||
|
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#ifndef __UNITTEST_RESOLVER_COMMON_INCLUDED__
|
||||
#define __UNITTEST_RESOLVER_COMMON_INCLUDED__
|
||||
|
19
vendor/ZMQ/unittests/unittest_udp_address.cpp
vendored
19
vendor/ZMQ/unittests/unittest_udp_address.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include <unity.h>
|
||||
#include "../tests/testutil.hpp"
|
||||
|
19
vendor/ZMQ/unittests/unittest_ypipe.cpp
vendored
19
vendor/ZMQ/unittests/unittest_ypipe.cpp
vendored
@@ -1,21 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2018 Contributors as noted in the AUTHORS file
|
||||
|
||||
This file is part of 0MQ.
|
||||
|
||||
0MQ is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
0MQ is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
|
||||
#include "../tests/testutil.hpp"
|
||||
|
||||
|
Reference in New Issue
Block a user