Tests

The following is auto-generated documentation for our test suite. The source code will be more useful for understanding the tests.

test_shuffle

Typedefs

using Group = std::set<int>
using LocalPermutation = std::vector<int>

Functions

template<typename Engine>
void test_shuffle_gen_perm(int test_size, Engine &engine)
template<typename Engine>
void test_shuffle_local_apply_perm(int test_size, Engine &engine)
template<typename Engine>
void test_shuffle_oblivious_apply_sharded_perm(int test_size, Engine &engine)
template<typename Engine>
void test_oblivious_apply_elementwise_perm(int test_size, Engine &engine)
template<typename Engine>
void test_reverse_elementwise_permutation(int test_size, Engine &engine)
template<typename Engine>
void test_elementwise_permutation_b2a_conversion(int test_size, Engine &engine)
template<typename Engine>
void test_invert_elementwise_permutation(int test_size, Engine &engine)
template<typename Engine>
void test_resharing(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_shuffle_correctness(int test_size, Engine &engine)
template<typename Engine>
void test_permutation_composition(int test_size, Engine &engine)
template<typename Engine>
void test_table_shuffle(int num_rows, int num_columns, Engine &engine)
int main(int argc, char **argv)

test_join

Defines

MASK_VALUE
RUN_ASSERTS
print_table(...)

Typedefs

using A = ASharedVector<int>
using B = BSharedVector<int>

Functions

template<typename Engine>
void test_multi_key(Engine &engine)
template<typename Engine>
void test_valid(Engine &engine)
template<typename Engine>
void check_simple(Engine &engine)
template<typename Engine>
void test_normal_behavior(Engine &engine)
template<typename Engine>
void test_outer(Engine &engine)
template<typename Engine>
void test_semi_anti_join(Engine &engine)
template<typename Engine>
void test_unique(Engine &engine)
int main(int argc, char **argv)

test_comparisons

Functions

int main(int argc, char **argv)

test_pooled

Functions

template<typename Generator, typename Engine>
void test_pooled(Engine &engine)
template<typename Engine>
void test_pooled_permutations(size_t num_permutations, size_t permutation_size, Engine &engine)
int main(int argc, char **argv)

Variables

const size_t test_size_1 = 1 << 12
const size_t test_size_2 = 1 << 11
const size_t test_size_3 = 1 << 10

test_runtime

Functions

void test_setup(int max_threads)
template<typename Engine>
void test_modify_parallel(int test_size, Engine &engine)
template<typename Engine>
void test_parallel_generation(size_t test_size, Engine &engine)
int main(int argc, char **argv)

test_randomness

Functions

template<typename T, typename Engine>
void test_local_prg_randomness(Engine &engine)
template<typename T>
void test_xchacha20_randomness()
void helper_check_group_generation_correct(int num_parties, int group_size, std::vector<std::set<int>> correct)
void test_group_generation()
template<typename T, typename Engine>
void test_3pc_common_prg_correctness(Engine &engine)
template<typename T, typename Engine>
void test_4pc_common_prg_correctness(Engine &engine)
template<typename T, typename Engine>
void test_common_prg_correctness_groups(Engine &engine)
template<typename T, typename Engine>
void test_zero_sharing_generator_correctness(Engine &engine)
template<typename T, typename Engine>
void test_zero_sharing_generator_groups(Engine &engine)
int main(int argc, char **argv)

Variables

const int num_parties = PROTOCOL_NUM

test_malicious

Defines

MAL_TEST_MODE

Functions

template<typename Engine>
bool joint_malicious_check(Engine &engine)

Parties broadcast their checks, and then take AND of all received. This ensure tests pass regardless of which party actually detected the cheating.

int main(int argc, char **argv)

test_operators

Defines

SIZE
NUM_ROWS

Functions

template<typename Engine>
void test_minimal_agg_example(Engine &engine)
template<typename S, typename Engine>
void test_vector_aggregation(const size_t test_size, Engine &engine)
template<typename S, typename Engine>
void test_distinct(const int test_size, Engine &engine)
template<typename S, typename Engine>
void test_multi_distinct(Engine &engine)
template<typename S, typename Engine>
void test_table_operators(Engine &engine)
template<typename Engine>
void test_max_monotonic(Engine &engine)

Special test to confirm that MAX aggregation is properly incrementally computed (i.e., result is monotonic). We crucially rely on this fact for the implementation of the threshold session window operator.

This was previously broken due to a incorrect argument to an access pattern; it’s a gnarly bug and even the correct output is a bit tricky to follow, so I think this is a good test to keep.

template<typename Engine>
void test_prefix_sum(Engine &engine)
template<typename Engine>
void test_most_common(Engine &engine)
int main(int argc, char **argv)

Variables

int pid
int correct

test_securejoin

Test that SecureJoin is properly installed and basic functionality works.

Functions

int main(int argc, char **argv)

test_communication

Functions

template<typename T, typename Engine>
void TestBasicCommunication(int testSize, Engine &engine)
int main(int argc, char **argv)

Variables

const int test_size = 1 << 16

test_computation_library

Functions

int main(int argc, char **argv)

test_sorting

Defines

TEST_SIZE

Functions

template<typename T, typename Engine>
void test_bitonicMerge(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_quicksort(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_pairwise(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_radix_sort(int test_size, Engine &engine)
template<typename Engine>
void test_valid_bit_sorting(int test_size, Engine &engine)
template<typename Engine>
void test_table_sort_single(int num_rows, int num_columns, cdough::SortingProtocol protocol, Engine &engine)
template<typename Engine>
void test_table_sort_multi(int num_rows, int num_columns, cdough::SortingProtocol protocol, bool test_tiebreak_explicit, Engine &engine)
template<typename Engine>
void test_odd_even_merge(int test_size, Engine &engine)
int main(int argc, char **argv)

test_io

Functions

int main(int argc, char **argv)

test_primitives

Defines

DEFINE_TEST_BINARY_OP(_op_, shareType, name)

Functions

template<typename T, typename Engine>
void test_b2a_bit(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_b2a(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_multiplication(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_arithmetic_greater_than(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_arithmetic_greater_than_equal(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_arithmetic_equal(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_binary_add(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_binary_subtract(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_and(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_xor(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_or(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_greater_than(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_less_than(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_private_division(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_dot_product(int test_size, const size_t aggSize, Engine &engine)
template<typename T, typename Engine>
void test_equals(int test_size, Engine &engine)
template<typename T, typename Engine>
void test_arithmetic_greater_than_public(Vector<T> data, Engine &engine)
int main(int argc, char **argv)

Variables

const int test_size = 1 << 14
const int DIV_TEST_SIZE = 1 << 6

test_libote

Test that libOTe is properly installed and basic functionality works.

Functions

int main(int argc, char **argv)

test_count_wrong_div

Functions

int main(int argc, char **argv)

test_table_operators

Functions

template<typename T, typename Engine>
EncodedTable<T> create_test_table(int column_count, Engine &engine)
template<typename T>
void assert_table_schema(EncodedTable<T> &table, size_t column_count)
template<typename T, typename Engine>
void test_add_columns(Engine &engine)
template<typename T, typename Engine>
void test_delete_columns(Engine &engine)
template<typename T, typename Engine>
void test_project(Engine &engine)
template<typename T, typename Engine>
void test_resize(Engine &engine)
int main(int argc, char **argv)

test_bitonic_sort

Functions

int main(int argc, char **argv)

test_correlated

Functions

template<typename T, template<typename> class C, typename Engine>
void checkCorrelation(std::string label, Engine &engine)
template<typename T, typename Engine>
void test_permutation_correlations(int test_size_, Engine &engine)
template<typename T, typename Engine>
void TestDummyAuthTriplesGenerator(const size_t testSize, Engine &engine)
template<typename T, typename Engine>
void TestDummyAuthRandomGenerator(const size_t testSize, Engine &engine)
int main(int argc, char **argv)

Variables

const size_t test_size = 1 << 12