Changeset 41422 for trunk/Ohana/src/libfits/test
- Timestamp:
- Sep 24, 2020, 2:44:55 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libfits/test/tablecomp.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/test/tablecomp.c
r39457 r41422 45 45 ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header"); 46 46 47 ok (gfits_define_bintable_column (&header, "B", "VAL_B", " byte","none", 1.0, 0.0), "defined byte column");47 ok (gfits_define_bintable_column (&header, "B", "VAL_B", "gfbyte", "none", 1.0, 0.0), "defined byte column"); 48 48 ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short", "none", 1.0, 0.0), "defined short column"); 49 49 ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int", "none", 1.0, 0.0), "defined int column"); … … 114 114 off_t Nrow; 115 115 116 char *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, " byte"),"read byte table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");116 char *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, "gfbyte"), "read byte table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); 117 117 short *VAL_I_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_I", type, &Nrow, &Ncol); ok (!strcmp (type, "short"), "read short table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); 118 118 int *VAL_J_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_J", type, &Nrow, &Ncol); ok (!strcmp (type, "int"), "read int table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); … … 142 142 } 143 143 144 ok (!NVAL_B_bad, " bytevalues match (input vs output)");144 ok (!NVAL_B_bad, "gfbyte values match (input vs output)"); 145 145 ok (!NVAL_I_bad, "short values match (input vs output)"); 146 146 ok (!NVAL_J_bad, "int values match (input vs output)"); … … 183 183 ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header"); 184 184 185 ok (gfits_define_bintable_column (&header, "B", "VAL_B", " byte", "none",1.0, 0.0), "defined byte column");186 ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short", "none", 1.0, 0.0), "defined short column");187 ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int", "none", 1.0, 0.0),"defined int column");188 ok (gfits_define_bintable_column (&header, "K", "VAL_K", "long", "none", 1.0, 0.0),"defined long column");189 ok (gfits_define_bintable_column (&header, "E", "VAL_E", "float", "degree", 1.0, 0.0), "defined float column");190 ok (gfits_define_bintable_column (&header, "D", "VAL_D", "double", "degree", 1.0, 0.0), "defined double column");185 ok (gfits_define_bintable_column (&header, "B", "VAL_B", "gfbyte", "none", 1.0, 0.0), "defined byte column"); 186 ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short", "none", 1.0, 0.0), "defined short column"); 187 ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int", "none", 1.0, 0.0), "defined int column"); 188 ok (gfits_define_bintable_column (&header, "K", "VAL_K", "long", "none", 1.0, 0.0), "defined long column"); 189 ok (gfits_define_bintable_column (&header, "E", "VAL_E", "float", "degree", 1.0, 0.0), "defined float column"); 190 ok (gfits_define_bintable_column (&header, "D", "VAL_D", "double", "degree", 1.0, 0.0), "defined double column"); 191 191 192 192 // generate the output array that carries the data … … 247 247 off_t Nrow; 248 248 249 char *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, " byte"),"read byte table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");249 char *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, "gfbyte"), "read byte table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); 250 250 short *VAL_I_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_I", type, &Nrow, &Ncol); ok (!strcmp (type, "short"), "read short table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); 251 251 int *VAL_J_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_J", type, &Nrow, &Ncol); ok (!strcmp (type, "int"), "read int table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); … … 271 271 } 272 272 273 ok (!NVAL_B_bad, " bytevalues match (input vs output)");273 ok (!NVAL_B_bad, "gfbyte values match (input vs output)"); 274 274 ok (!NVAL_I_bad, "short values match (input vs output)"); 275 275 ok (!NVAL_J_bad, "int values match (input vs output)"); … … 383 383 ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header"); 384 384 385 ok (gfits_define_bintable_column (&header, "B", "VAL_B", " byte","none", 1.0, 0.0), "defined byte column");385 ok (gfits_define_bintable_column (&header, "B", "VAL_B", "gfbyte", "none", 1.0, 0.0), "defined byte column"); 386 386 ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short", "none", 1.0, 0.0), "defined short column"); 387 387 ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int", "none", 1.0, 0.0), "defined int column"); … … 444 444 off_t Nrow; 445 445 446 char *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, " byte"),"read byte table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");446 char *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, "gfbyte"), "read byte table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); 447 447 short *VAL_I_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_I", type, &Nrow, &Ncol); ok (!strcmp (type, "short"), "read short table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); 448 448 int *VAL_J_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_J", type, &Nrow, &Ncol); ok (!strcmp (type, "int"), "read int table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols"); … … 472 472 } 473 473 474 ok (!NVAL_B_bad, " bytevalues match (input vs output)");474 ok (!NVAL_B_bad, "gfbyte values match (input vs output)"); 475 475 ok (!NVAL_I_bad, "short values match (input vs output)"); 476 476 ok (!NVAL_J_bad, "int values match (input vs output)");
Note:
See TracChangeset
for help on using the changeset viewer.
