H5Dget_native_type Test Review

  1. Purpose:

    This document describes the API test review results for H5Tget_native_type().

  2. Serial Review:

    Test case Test source file Test method Expected test results Notes
    Native int datatype native.c
    1. Create dataset with I32BE datatype
    2. Query dataset's datatype
    3. Create native datatype from dataset datatype
    4. Compare order, class & size of native datatype to known results
    Check that type's size, order and class are correct.

    Data is written & read back in for this test.

    It would be convenient to have a function in the test module for choosing the correct atomic datatype based on the particular platform settings. This should use the H5_SIZEOF_ macros.

    Native long long datatype native.c
    1. Create dataset with I64LE datatype
    2. Query dataset's datatype
    3. Create native datatype from dataset datatype
    4. Compare order, class & size of native datatype to known results
    Check that type's size, order and class are correct.

    Data is NOT written & read back in for this test.

    Native char datatype native.c
    1. Create dataset with I8LE datatype
    2. Query dataset's datatype
    3. Create native datatype from dataset datatype
    4. Compare order, class & size of native datatype to known results
    Check that type's size, order and class are correct.

    Data is NOT written & read back in for this test.

    Native float datatype native.c
    1. Create dataset with F32BE datatype
    2. Query dataset's datatype
    3. Create native datatype from dataset datatype
    4. Compare order, class & size of native datatype to known results
    Check that type's size, order and class are correct.

    Data is NOT written & read back in for this test.

    Need test for native double datatype (stored as 32-bit floating-point datatype in file). This will probably require using an "epsilon" if the data is compared for this test.

    Compound datatype with atomic fields native.c
    1. Create datatype describing native (unpacked) struct in memory
    2. Create datatype describing packed struct for disk
    3. Create dataset with "packed" compound datatype
    4. Query dataset's datatype
    5. Get native datatype from dataset's datatype
    6. Use H5Tequal to verify that the native datatype is the same as the native, unpacked datatype.
    Check that native and unpacked datatypes are equal.

    Data is written & read back in for this test.

    Compound datatype with one compound field native.c
    1. Create datatype describing nested native (unpacked) structs in memory
    2. Create datatype describing nested packed structs for disk
    3. Create dataset with "packed" compound datatype
    4. Query dataset's datatype
    5. Get native datatype from dataset's datatype
    6. Use H5Tequal to verify that the native datatype is the same as the native, unpacked datatype.
    Check that native and unpacked datatypes are equal.

    Data is written & read back in for this test.

    Could use test for compound datatype with multiple compound fields.

    Could use test for 3 or more nested deep compound datatype.

    Enum datatype native.c
    1. Create enum datatype
    2. Create dataset with enum datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original enum datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Array datatype native.c
    1. Create array datatype
    2. Create dataset with array datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original array datatype.
    Check that native and original datatypes are equal.

    This is not tested currently.

    Array of compound datatype native.c
    1. Create array of compound datatype
    2. Create dataset with array of compound datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original array of compound datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Compound datatype with array field native.c
    1. Create compound datatype with array field
    2. Create dataset with compound datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original compound datatype.
    Check that native and original datatypes are equal.

    This is not tested currently.

    VL datatype with atomic base type native.c
    1. Create VL datatype
    2. Create dataset with VL datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original VL datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Combinations with VL datatypes in other composite types and with other datatypes for the base type of the VL datatype are not tested.

    VL string datatype native.c
    1. Create VL string datatype
    2. Create dataset with VL string datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original VL string datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Combinations with VL string datatypes in composite types are not tested.

    Reference datatype native.c
    1. Create reference datatype
    2. Create dataset with reference datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original reference datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Combinations with reference datatypes in composite types are not tested.

    Opaque datatype native.c
    1. Create opaque datatype
    2. Create dataset with opaque datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original opaque datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Combinations with opaque datatypes in composite types are not tested.

    Bitfield datatype native.c
    1. Create bitfield datatype
    2. Create dataset with bitfield datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original bitfield datatype.
    Check that native and original datatypes are equal.

    Data is written & read back in for this test.

    Combinations with bitfield datatypes in composite types are not tested.

    Time datatype native.c
    1. Create time datatype
    2. Create dataset with time datatype
    3. Query dataset's datatype
    4. Get native datatype from dataset's datatype
    5. Use H5Tequal to verify that the native datatype is the same as the original time datatype.
    Check that native and original datatypes are equal.

    This is not tested currently.


  3. Parallel Review:

    The H5Dget_native_type() function is not tested in parallel. Currently, there does not appear to be a need for this.