private void ParseAndEnsureEquality(string spec, Argument argument)
        {
            try
            {
                var parsedLiteral = ParseObjectLiteral(spec);

                if (parsedLiteral == UndefinedValue.Instance)
                {
                    Assert.Equal(argument, Cmd.Undefined());
                }
                else
                {
                    var parsedArgument = CommandLineArgumentsConverter.ObjectLiteralToArgument(
                        new Names(FrontEndContext.SymbolTable),
                        parsedLiteral as ObjectLiteral);
                    Assert.Equal(argument, parsedArgument);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Conversion failed for : " + spec.Split(new[] { Environment.NewLine }, StringSplitOptions.None).LastOrDefault());
                Console.WriteLine("    Exception : " + e.GetLogEventMessage());
                throw;
            }
        }
        public void TestConversionFailures(string literal)
        {
            try
            {
                // Explicit try-catch was used to print error message for debugging purposes.
                var parsedLiteral       = ParseObjectLiteral(literal);
                var parsedObjectLiteral = parsedLiteral as ObjectLiteral;

                if (parsedObjectLiteral != null)
                {
                    CommandLineArgumentsConverter.ObjectLiteralToArgument(new Names(FrontEndContext.SymbolTable), parsedObjectLiteral);
                }

                XAssert.Fail("DScript snippet '{0}' didn't fail as expected", literal);
            }
            catch (ConvertException e)
            {
                Console.WriteLine("Expected conversion exception happens. Message: " + e.Message);
            }
        }