Example #1
0
        public void PointerMethodsAreSingletons()
        {
            using (var test = MakeTest(@"PerformanceTestCases\PointerMethodsAreSingletons.cs")) {
                var data = new PerformanceAnalysisData(test, MakeUnsafeConfiguration);

                Console.WriteLine(data.Output);

                try {
                    AssertIsSingleton(data, "pBuffer.getElement");
                    AssertIsSingleton(data, "pBuffer.setElement");
                    // FIXME: Fails. Something about this function makes SpiderMonkey unhappy :-(
                    AssertIsSingleton(data, "Program.TestInlineAccess");
                } catch (Exception) {
                    data.Dump(Console.Out);
                    throw;
                }
            }
        }
Example #2
0
        public void PointerMethodsAreSingletons()
        {
            using (var test = MakeTest(@"PerformanceTestCases\PointerMethodsAreSingletons.cs")) {
                var data = new PerformanceAnalysisData(test, MakeUnsafeConfiguration);

                Console.WriteLine(data.Output);

                try {
                    AssertIsSingleton(data, "pBuffer.getElement");
                    AssertIsSingleton(data, "pBuffer.setElement");
                    // FIXME: Fails. Something about this function makes SpiderMonkey unhappy :-(
                    AssertIsSingleton(data, "Program.TestInlineAccess");
                } catch (Exception exc) {
                    data.Dump(Console.Out);
                    throw;
                }
            }
        }
Example #3
0
 private void AssertIsSingleton(PerformanceAnalysisData data, string expression)
 {
     Assert.IsTrue(data[expression].IsSingleton, expression + " is not a singleton");
 }
Example #4
0
 private void AssertIsSingleton(PerformanceAnalysisData data, string expression)
 {
     Assert.IsTrue(data[expression].IsSingleton, expression + " is not a singleton");
 }