Exemplo n.º 1
0
        public void TestParseCStringEmpty()
        {
            MIResults r = new MIResults(null);
            string miString = ""; // input = <empty>
            string result = r.ParseCString(miString);

            Assert.Equal(String.Empty, result);

            miString = "\"\""; // input = ""
            result = r.ParseCString(miString);

            Assert.Equal(String.Empty, result);
        }
Exemplo n.º 2
0
        public void TestParseCStringNull()
        {
            string miString = null; //input = <null>

            Assert.Throws <ArgumentNullException>(delegate
            {
                MIResults r = new MIResults(null);
                r.ParseCString(miString);
            });
        }
Exemplo n.º 3
0
        public void TestParseCStringNull()
        {
            string miString = null; //input = <null>

            Assert.Throws<ArgumentNullException>(delegate
            {
                MIResults r = new MIResults(null);
                r.ParseCString(miString);
            });
        }
Exemplo n.º 4
0
        public void TestParseCStringEmpty()
        {
            string miString = ""; // input = <empty>
            string result   = MIResults.ParseCString(miString);

            Assert.Equal(String.Empty, result);

            miString = "\"\""; // input = ""
            result   = MIResults.ParseCString(miString);

            Assert.Equal(String.Empty, result);
        }
Exemplo n.º 5
0
        public void TestParseCString()
        {
            MIResults r = new MIResults(null);
            string miString = "\"hello\""; //input = "hello"
            string result = r.ParseCString(miString);
            Assert.Equal("hello", result);

            miString = "\"\\tHello\\n\""; //input = "\tHello\n"
            result = r.ParseCString(miString);
            Assert.Equal("\tHello\n", result);

            miString = "\"    \""; //input = <four spaces>
            result = r.ParseCString(miString);
            Assert.Equal("    ", result);

            miString = "    \"Hello\"     "; //input = <leading spaces>"Hello"<trailing spaces>
            result = r.ParseCString(miString);
            Assert.Equal("Hello", result);

            miString = "\"\"\"\"\"\""; //input = """"""
            result = r.ParseCString(miString);
            Assert.Equal("\"\"", result);
        }
Exemplo n.º 6
0
        public void TestParseCString()
        {
            MIResults r        = new MIResults(null);
            string    miString = "\"hello\""; //input = "hello"
            string    result   = r.ParseCString(miString);

            Assert.Equal("hello", result);

            miString = "\"\\tHello\\n\""; //input = "\tHello\n"
            result   = r.ParseCString(miString);
            Assert.Equal("\tHello\n", result);

            miString = "\"    \""; //input = <four spaces>
            result   = r.ParseCString(miString);
            Assert.Equal("    ", result);

            miString = "    \"Hello\"     "; //input = <leading spaces>"Hello"<trailing spaces>
            result   = r.ParseCString(miString);
            Assert.Equal("Hello", result);

            miString = "\"\"\"\"\"\""; //input = """"""
            result   = r.ParseCString(miString);
            Assert.Equal("\"\"", result);
        }