Exemple #1
0
        public void test_2()
        {
            int a = a1 + a2;

            DFunc.log("The result is changed to " + a);
            DFunc.returnFAIL();
        }
Exemple #2
0
        public void test_1()
        {
            a1 = 5;
            a2 = 6;
            int a = a1 + a2;

            DFunc.log("The result is " + a);
            DFunc.returnPASS();
        }
Exemple #3
0
        internal static Test[] getTests(string path)
        {
            ArrayList tests = new ArrayList();

            try
            {
                // Create an instance of StreamReader to read from a file.
                // The using statement also closes the StreamReader.
                using (StreamReader sr = new StreamReader(path))
                {
                    String line;
                    // Read all lines from the file until the end of
                    // the file is reached.
                    while ((line = sr.ReadLine()) != null)
                    {
                        //skip comments
                        if (line.StartsWith("#"))
                        {
                            continue;
                        }
                        //TestsReader.copyDlls(TestsReader.getLocation(line));
                        tests.Add(TestsReader.generateTest(line));
                    }
                }

                //copy to Test[]
                Test[] results = new Test[tests.Count];
                for (int i = 0; i < tests.Count; i++)
                {
                    results[i] = (Test)tests[i];
                }
                return(results);
            }
            catch (Exception e)
            {
                string msg = "Specified file not found: " + path;
                DFunc.log(msg);
                DFunc.log(e.Message);
                Console.WriteLine(msg);
                return(null);
            }
        }
Exemple #4
0
 public void test_2_undo()
 {
     DFunc.log("Undo");
 }