1 /*****************************************************************************
2 Copyright (c) 2011, Lab of Parallel Software and Computational Science,ICSAS
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
9 1. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in
14 the documentation and/or other materials provided with the
16 3. Neither the name of the ISCAS nor the names of its contributors may
17 be used to endorse or promote products derived from this software
18 without specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
29 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 **********************************************************************************/
36 #include "common_utest.h"
37 #include <CUnit/Basic.h>
39 CU_TestInfo test_level1[]={
40 {"Testing srot when incx || incy == 0",test_srot_inc_0},
41 {"Testing drot when incx || incy == 0",test_drot_inc_0},
42 {"Testing csrot when incx || incy == 0",test_csrot_inc_0},
43 {"Testing zdrot when incx || incy == 0",test_zdrot_inc_0},
45 {"Testing sswap with incx || incy == 0",test_sswap_inc_0},
46 {"Testing dswap with incx || incy == 0",test_dswap_inc_0},
47 {"Testing cswap with incx || incy == 0",test_cswap_inc_0},
48 {"Testing zswap with incx || incy == 0",test_zswap_inc_0},
50 {"Testing saxpy with incx || incy == 0",test_saxpy_inc_0},
51 {"Testing daxpy with incx || incy == 0",test_daxpy_inc_0},
52 {"Testing caxpy with incx || incy == 0",test_caxpy_inc_0},
53 {"Testing zaxpy with incx || incy == 0",test_zaxpy_inc_0},
55 {"Testing zdotu with n == 1",test_zdotu_n_1},
56 {"Testing zdotu with input x & y offset == 1",test_zdotu_offset_1},
58 {"Testing drotmg",test_drotmg},
60 {"Testing dsdot with n == 1",test_dsdot_n_1},
62 {"Testing samax", test_samax},
66 CU_SuiteInfo suites[]={
67 {"Level1 Test Suite", NULL,NULL,test_level1},
74 if (CUE_SUCCESS != CU_initialize_registry())
75 return CU_get_error();
77 error=CU_register_suites(suites);
79 if (error != CUE_SUCCESS) {
80 perror(CU_get_error_msg());
81 CU_cleanup_registry();
82 return CU_get_error();
88 printf("Seting OK\n");
91 /* Run all tests using the CUnit Basic interface */
92 CU_basic_set_mode(CU_BRM_VERBOSE);
96 CU_cleanup_registry();
98 return CU_get_error();