示例#1
0
int main()
{
    test(1000);
    test_comp(1000);
    test_proj(1000);
    test_move_only(1000);

    {
        int const N = 1000;
        S* ia = new S[N];
        int* ib = new int[N];
        for (int i = 0; i < N; ++i)
            ia[i].i = i;
        std::shuffle(ia, ia+N, gen);
        for (int i = 0; i <= N; ++i)
        {
            CHECK(ranges::push_heap(ranges::make_iterator_range(ia, ia+i), std::greater<int>(), &S::i).get_unsafe() == ia+i);
            std::transform(ia, ia+i, ib, std::mem_fn(&S::i));
            CHECK(std::is_heap(ib, ib+i, std::greater<int>()));
        }
        delete[] ia;
        delete[] ib;
    }

    return test_result();
}
示例#2
0
int main()
{
    test(1000);
    test_comp(1000);
    test_proj(1000);
    test_move_only(1000);

    return test_result();
}
示例#3
0
int main() {
	puts("Testing mathematics...");
	test_math();
	puts("OK!");
	
	puts("Testing comparisons...");
	test_comp();
	puts("OK!");

	puts("Testing comparisons...");
	test_array_struct();
	puts("OK!");

	puts("Testing string library...");
	test_lib_string();
	puts("OK!");

	puts("Testing alu errors...");
	test_alu_errors();
	puts("OK!");

	puts("Testing assert, standard & setjmp library...");
	test_lib_std_setjmp();
	puts("OK!");

	puts("Testing I/O library");
	test_lib_io();
	puts("OK!");

	puts("Testing trap instruction...");
	test_trap();
	puts("OK!");

	puts("Testing out of memory protection...");
	test_oom();
	puts("OK!");

	puts("No errors found");

	return 0;
}
示例#4
0
int main()
{
    test_comp();
    test_comp_set();
}