コード例 #1
0
        /// <summary>
        ///   再生成を行わずAssertCompareCompiledCodeが正常に動作するかテストします。 全く同じコードをコンパイルしたバイナリファイル同士で比較します。
        /// </summary>
        /// <param name="orgPath"> 再生成するソースコードのパス </param>
        public void VerifyAssertCompareCompiledCode(string orgPath)
        {
            var workPath = FixtureUtil.CleanOutputAndGetOutputPath();
            var fileName = Path.GetFileName(orgPath);
            var srcPath  = FixtureUtil.GetOutputPath(fileName);

            GuessEncoding.Convert(orgPath, srcPath, Encoding.Default);
            Fixture.Compile(workPath, srcPath);
            var expected = Fixture.GetAllCompiledCode(workPath);

            Fixture.Compile(workPath, srcPath);
            var actual = Fixture.GetAllCompiledCode(workPath);

            AssertFuzzyEquals(actual, expected);
        }
コード例 #2
0
 private IEnumerable <TestCaseData> SetUpAIChallenge()
 {
     return(SetUpTestCaseData(
                "aichallenge",
                path =>
                DownloadAndUnzip(
                    "https://github.com/aichallenge/aichallenge/zipball/epsilon",
                    path),
                workPath => {
         var paths = Directory.EnumerateFiles(
             workPath, "*.js", SearchOption.AllDirectories);
         foreach (var path in paths)
         {
             GuessEncoding.Convert(path, Encoding.Default);
         }
         CompileAll(workPath);
     }));
 }