Esempio n. 1
0
 public string testMulti(XMulti multi)
 {
     try {
         checkEqual(0.0, multi.att1);
         multi.att1 = 0.1;
         checkEqual(0.1, multi.att1);
         checkEqual(11 * 1, multi.fn11(1));
         checkEqual("12" + "abc", multi.fn12("abc"));
         checkEqual(21 * 2, multi.fn21(2));
         checkEqual("22" + "de", multi.fn22("de"));
         checkEqual(0.0, multi.att3);
         multi.att3 = 0.3;
         checkEqual(0.3, multi.att3);
         checkEqual(31 * 3, multi.fn31(3));
         checkEqual("32" + "f", multi.fn32("f"));
         checkEqual(33, multi.fn33());
         checkEqual(41 * 4, multi.fn41(4));
         checkEqual(61 * 6, multi.fn61(6));
         checkEqual("62" + "", multi.fn62(""));
         checkEqual(71 * 7, multi.fn71(7));
         checkEqual("72" + "g", multi.fn72("g"));
         checkEqual(73, multi.fn73());
     } catch (CheckFailed f) {
         return(f.Message);
     }
     return("");
 }
Esempio n. 2
0
 public string testMulti(XMulti multi)
 {
     try {
     checkEqual(0.0, multi.att1);
     multi.att1 = 0.1;
     checkEqual(0.1, multi.att1);
     checkEqual(11 * 1, multi.fn11(1));
     checkEqual("12" + "abc", multi.fn12("abc"));
     checkEqual(21 * 2, multi.fn21(2));
     checkEqual("22" + "de", multi.fn22("de"));
     checkEqual(0.0, multi.att3);
     multi.att3 = 0.3;
     checkEqual(0.3, multi.att3);
     checkEqual(31 * 3, multi.fn31(3));
     checkEqual("32" + "f", multi.fn32("f"));
     checkEqual(33, multi.fn33());
     checkEqual(41 * 4, multi.fn41(4));
     checkEqual(61 * 6, multi.fn61(6));
     checkEqual("62" + "", multi.fn62(""));
     checkEqual(71 * 7, multi.fn71(7));
     checkEqual("72" + "g", multi.fn72("g"));
     checkEqual(73, multi.fn73());
     } catch (CheckFailed f) {
     return f.Message;
     }
     return "";
 }