IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2020, 2:44:55 PM (6 years ago)
Author:
eugene
Message:

rename libfits byte-type to gfbyte to avoid collisions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/test/tablecomp.c

    r39457 r41422  
    4545  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
    4646
    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");
    4848  ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short",  "none", 1.0, 0.0), "defined short column");
    4949  ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int",    "none", 1.0, 0.0),  "defined int column");
     
    114114  off_t Nrow;
    115115
    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");
    117117  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");
    118118  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");
     
    142142  }
    143143
    144   ok (!NVAL_B_bad, "byte    values match (input vs output)");
     144  ok (!NVAL_B_bad, "gfbyte  values match (input vs output)");
    145145  ok (!NVAL_I_bad, "short   values match (input vs output)");
    146146  ok (!NVAL_J_bad, "int     values match (input vs output)");
     
    183183  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
    184184
    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");
    191191 
    192192  // generate the output array that carries the data
     
    247247  off_t Nrow;
    248248
    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");
    250250  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");
    251251  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");
     
    271271  }
    272272
    273   ok (!NVAL_B_bad, "byte    values match (input vs output)");
     273  ok (!NVAL_B_bad, "gfbyte  values match (input vs output)");
    274274  ok (!NVAL_I_bad, "short   values match (input vs output)");
    275275  ok (!NVAL_J_bad, "int     values match (input vs output)");
     
    383383  ok (gfits_create_table_header (&header, "BINTABLE", "TESTDATA"), "created the table header");
    384384
    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");
    386386  ok (gfits_define_bintable_column (&header, "I", "VAL_I", "short",  "none", 1.0, 0.0), "defined short column");
    387387  ok (gfits_define_bintable_column (&header, "J", "VAL_J", "int",    "none", 1.0, 0.0),  "defined int column");
     
    444444  off_t Nrow;
    445445
    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");
    447447  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");
    448448  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");
     
    472472  }
    473473
    474   ok (!NVAL_B_bad, "byte    values match (input vs output)");
     474  ok (!NVAL_B_bad, "gfbyte  values match (input vs output)");
    475475  ok (!NVAL_I_bad, "short   values match (input vs output)");
    476476  ok (!NVAL_J_bad, "int     values match (input vs output)");
Note: See TracChangeset for help on using the changeset viewer.