# H5Dget_native_type Test Review

1. ### Purpose:

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

2. ### Serial Review:

   Test case | Test source file | Test method | Expected test results | Notes
   --- | --- | --- | --- | ---
   Native int datatype | native.c | Create dataset with I32BE datatype Query dataset's datatype Create native datatype from dataset datatype 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 | Create dataset with I64LE datatype Query dataset's datatype Create native datatype from dataset datatype 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 | Create dataset with I8LE datatype Query dataset's datatype Create native datatype from dataset datatype 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 | Create dataset with F32BE datatype Query dataset's datatype Create native datatype from dataset datatype 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 | Create datatype describing native (unpacked) struct in memory Create datatype describing packed struct for disk Create dataset with "packed" compound datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create datatype describing nested native (unpacked) structs in memory Create datatype describing nested packed structs for disk Create dataset with "packed" compound datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create enum datatype Create dataset with enum datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create array datatype Create dataset with array datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create array of compound datatype Create dataset with array of compound datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create compound datatype with array field Create dataset with compound datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create VL datatype Create dataset with VL datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create VL string datatype Create dataset with VL string datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create reference datatype Create dataset with reference datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create opaque datatype Create dataset with opaque datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create bitfield datatype Create dataset with bitfield datatype Query dataset's datatype Get native datatype from dataset's datatype 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 | Create time datatype Create dataset with time datatype Query dataset's datatype Get native datatype from dataset's datatype 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.