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

void test_shuffle_gen_perm(int test_size)
void test_shuffle_local_apply_perm(int test_size)
void test_shuffle_oblivious_apply_sharded_perm(int test_size)
void test_oblivious_apply_elementwise_perm(int test_size)
void test_reverse_elementwise_permutation(int test_size)
void test_elementwise_permutation_b2a_conversion(int test_size)
void test_invert_elementwise_permutation(int test_size)
void test_resharing(int test_size)
template<typename T>
void test_shuffle_correctness(int test_size)
void test_permutation_composition(int test_size)
void test_table_shuffle(int num_rows, int num_columns)
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

void test_multi_key()
void test_valid()
void check_simple()
void test_normal_behavior()
void test_outer()
void test_semi_anti_join()
void test_unique()
int main(int argc, char **argv)

test_comparisons

Functions

int main(int argc, char **argv)

test_pooled

Functions

template<typename Generator>
void test_pooled()
void test_pooled_permutations(size_t num_permutations, size_t permutation_size)
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)
void test_modify_parallel(int test_size)
void test_parallel_generation(size_t test_size)
int main(int argc, char **argv)

test_randomness

Functions

template<typename T>
void test_local_prg_randomness()
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>
void test_3pc_common_prg_correctness()
template<typename T>
void test_4pc_common_prg_correctness()
template<typename T>
void test_common_prg_correctness_groups()
template<typename T>
void test_zero_sharing_generator_correctness()
template<typename T>
void test_zero_sharing_generator_groups()
int main(int argc, char **argv)

Variables

const int num_parties = PROTOCOL_NUM

test_malicious

Functions

bool joint_malicious_check()

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

void test_minimal_agg_example()
template<typename S>
void test_vector_aggregation(const size_t test_size = 32)
template<typename S>
void test_distinct(const int test_size = 32)
template<typename S>
void test_multi_distinct()
template<typename S>
void test_table_operators()
void test_max_monotonic()

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.

void test_prefix_sum()
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>
void TestBasicCommunication(const int &testSize)
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>
void test_bitonicMerge(int test_size)
template<typename T>
void test_quicksort(int test_size)
template<typename T>
void test_radix_sort(int test_size)
void test_valid_bit_sorting(int test_size)
void test_table_sort_single(int num_rows, int num_columns, orq::SortingProtocol protocol)
void test_table_sort_multi(int num_rows, int num_columns, orq::SortingProtocol protocol, bool test_tiebreak_explicit)
void test_odd_even_merge(int test_size)
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>
void test_b2a_bit(int test_size)
template<typename T>
void test_b2a(int test_size)
template<typename T>
void test_multiplication(int test_size)
template<typename T>
void test_binary_add(int test_size)
template<typename T>
void test_binary_subtract(int test_size)
template<typename T>
void test_and(int test_size)
template<typename T>
void test_xor(int test_size)
template<typename T>
void test_or(int test_size)
template<typename T>
void test_greater_than(int test_size)
template<typename T>
void test_less_than(int test_size)
template<typename T>
void test_private_division(int test_size)
template<typename T>
void test_dot_product(int test_size, const int aggSize = 7)
template<typename T>
void test_equals(int test_size)
int main(int argc, char **argv)

Variables

const int test_size = 1 << 16
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>
EncodedTable<T> create_test_table(int column_count)
template<typename T>
void assert_table_schema(EncodedTable<T> table, size_t column_count)
template<typename T>
void test_add_columns()
template<typename T>
void test_delete_columns()
template<typename T>
void test_project()
template<typename T>
void test_resize()
int main(int argc, char **argv)

test_bitonic_sort

Functions

int main(int argc, char **argv)

test_correlated

Functions

template<typename T, orq::random::Correlation C>
void checkCorrelation(std::string label)
template<typename T>
void test_permutation_correlations(int test_size)
template<typename T>
void TestDummyAuthTriplesGenerator(const size_t &testSize)
template<typename T>
void TestDummyAuthRandomGenerator(const size_t &testSize)
int main(int argc, char **argv)

Variables

const size_t test_size = 1 << 12