TestSuite *words_tests() { TestSuite *suite = create_test_suite(); add_test_with_context(suite, Words, returns_word_count); add_test_with_context(suite, Words, converts_spaces_to_zeroes); add_test_with_context(suite, Words, invokes_callback_once_for_single_word_sentence); add_test_with_context(suite, Words, invokes_callback_for_each_word_in_a_phrase); return suite; }
TestSuite *find_first_mode_greater_than_or_equal_to_tests() { TestSuite *suite = create_test_suite(); add_test_with_context(suite, find_first_mode_greater_than_or_equal_to, returns_right_results_in_a_random_array); add_test_with_context(suite, find_first_mode_greater_than_or_equal_to, returns_correct_results_for_an_ordered_array); return suite; }
int main(int argc, char **argv) { PetscInitialize(&argc, &argv, NULL, help); TestSuite *suite = create_test_suite(); add_test_with_context(suite, FFT, can_be_constructed_from_DMDA); add_test_with_context(suite, FFT, registers_the_right_DM); add_test_with_context(suite, FFT, creates_output_vector_of_correct_size); add_test_with_context(suite, FFT, transforms_constant_into_delta_function); add_test_with_context(suite, FFT, can_transform_second_component); add_test_with_context(suite, FFT, i_transform_is_inverse_of_transform); add_test_with_context(suite, FFT, PSD_of_delta_function_is_flat); add_test_with_context(suite, FFT, yields_PSD_of_the_correct_size); int result; if (argc > 2) { result = run_single_test(suite, argv[1], create_text_reporter()); } else { result = run_test_suite(suite, create_text_reporter()); } destroy_test_suite(suite); PetscFinalize(); return result; }
int main(int argc, char **argv) { PetscInitialize(&argc, &argv, NULL, help); TestSuite *suite = create_test_suite(); add_test_with_context(suite, FourthOrderJacobian, can_be_built); add_test_with_context(suite, FourthOrderJacobian, is_consistent_for_constant_fields); add_test_with_context(suite, FourthOrderJacobian, is_consistent_for_sine_waves); add_test_with_context(suite, FourthOrderJacobian, is_consistent_for_gaussian); add_test_with_context(suite, FourthOrderJacobian, is_consistent_for_constant_right_moving); add_test_with_context(suite, FourthOrderJacobian, is_consistent_for_sine_wave_right_moving); add_test_with_context(suite, FourthOrderJacobian, is_consistent_for_gaussian_right_moving); /* Disable this test for now, need the right Chi3 physics add_test(suite, prec_consistent_sine_wave_non_zero_gamma); */ int result; if (argc > 2) { result = run_single_test(suite, argv[1], create_text_reporter()); } else { result = run_test_suite(suite, create_text_reporter()); } destroy_test_suite(suite); PetscFinalize(); return result; }
TestSuite *generate_logarithmic_bins_tests() { TestSuite *suite = create_test_suite(); add_test_with_context(suite, generate_logarithmic_bins, sets_bins_boundries_correct); return suite; }
TestSuite *our_tests() { TestSuite *suite = create_test_suite(); add_test_with_context(suite, Strlen, returns_five_for_hello); return suite; }
int main(int argc, char **argv) { TestSuite *suite = create_test_suite(); add_test_with_context(suite, CrashExample, seg_faults_for_null_dereference); add_test_with_context(suite, CrashExample, will_loop_forever); return run_test_suite(suite, create_text_reporter()); }
int main() { int err; TestSuite *suite = create_test_suite(); add_test_with_context(suite, eclGetContextInteractively, runs); add_test_with_context(suite, eclGetContextInteractively, returnsAContextIfNoErrorOccured); add_test_with_context(suite, eclGetContextInteractively, returnsAValidContext); add_test_with_context(suite, eclGetContextInteractively, returnsADeviceIfNoErrorOccured); add_test_with_context(suite, eclGetContextInteractively, returnsAValidDevice); add_test_with_context(suite, eclGetContextInteractively, returnsACommandQueueIfNoErrorOccured); add_test_with_context(suite, eclGetContextInteractively, returnsAValidCommandQueue); add_test_with_context(suite, eclGetContextInteractively, commandQueueConsistentWithContext); add_test_with_context(suite, eclGetContextInteractively, commandQueueConsistentWithDevice); add_test_with_context(suite, eclGetContextInteractively, doesntCrashDueToBogusPlatformChoice); add_test_with_context(suite, eclGetContextInteractively, recoversFromBogusPlatformChoice); add_test_with_context(suite, eclGetContextInteractively, doesntCrashDueToBogusDeviceChoice); add_test_with_context(suite, eclGetContextInteractively, recoversFromBogusDeviceChoice); err = run_test_suite(suite, create_text_reporter()); destroy_test_suite(suite); return err; }