tests for structs