void
TestDataStructuresChild::Test6()
{
    IntDoubleArrays id1(int(42));
    InfallibleTArray<int> id2;
    id2.AppendElement(1); id2.AppendElement(2); id2.AppendElement(3);
    InfallibleTArray<double> id3;
    id3.AppendElement(1.0); id3.AppendElement(2.0); id3.AppendElement(3.0);

    InfallibleTArray<IntDoubleArrays> i1;
    i1.AppendElement(id1);
    i1.AppendElement(IntDoubleArrays(id2));
    i1.AppendElement(IntDoubleArrays(id3));

    InfallibleTArray<IntDoubleArrays> o1;
    if (!SendTest6(i1, &o1))
        fail("can't send Test6");

    test_assert(3 == o1.Length(), "wrong length");
    IntDoubleArrays od1(o1[0]);
    InfallibleTArray<int> od2(o1[1].get_ArrayOfint());
    InfallibleTArray<double> od3(o1[2].get_ArrayOfdouble());

    test_assert(42 == od1.get_int(), "wrong value");
    assert_arrays_equal(id2, od2);
    assert_arrays_equal(id3, od3);

    printf("  passed %s\n", __FUNCTION__);
}
Beispiel #2
0
int
main(){
  OD  od0(0,10);
  OD  od1(0,128);
  OD  od2(0,255);
  OD  od3(200,100);
  
  OD  od41(0,255);
  OD2 od4 (od41,100,15);
  
  plot2d(od0,
	 od1,
	 od2,
	 od3,
	 od4,
	 0.0,100.0);
  return 0;
}