classdef struct2single_test < genlib_test
  % Test struct2single
  %
  % [+GenLib General Purpose Library+] Swiss Plasma Center EPFL Lausanne 2022. All rights reserved.
  
  methods (Test)
    function convert_struct_w_doubles_to_singles(testCase)
      A.a=rand(5);
      A.b='abc';
      A.c=struct('a',rand(1,4),'b','hello');
      
      B=struct2single(A);
      
      testCase.assertInstanceOf(B.a,'single');
      testCase.assertInstanceOf(B.c.a,'single');
      testCase.assertInstanceOf(B.c.b,'char');


    end
  end
  
end
