schemy/src/test/Program.cs

28 lines
764 B
C#
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace test
{
using System;
using System.IO;
using Schemy;
class Program
{
static void Main(string[] args)
{
var interpreter = new Interpreter(fsAccessor: new ReadOnlyFileSystemAccessor());
using (var reader = new StreamReader(File.OpenRead("tests.ss")))
{
var result = interpreter.Evaluate(reader);
if (result.Error != null)
{
throw new InvalidOperationException(string.Format("Test Error: {0}", result.Error));
}
}
Console.WriteLine("Tests were successful");
}
}
}