Exemplo n.º 1
0
 /// <summary>
 /// Checks <see cref="AnalyzerResult.FileOutput"/> for correct analysis on a pip cache miss.
 /// </summary>
 /// <param name="pip">The expected pip that had a miss.</param>
 /// <param name="missType">The expected <see cref="PipCacheMissType"/>.</param>
 /// <param name="messages">Expected messages to be printed.</param>
 /// <note>
 /// This is highly inefficient since it does a full pass over the
 /// output file for every assertion.
 /// </note>
 public static AnalyzerResult AssertPipMiss(
     this AnalyzerResult result,
     Pip pip,
     PipCacheMissType missType,
     params string[] messages)
 {
     FingerprintStoreAnalyzerTestsClass?.AssertCacheMissEventLogged(messages);
     return(AssertAnalyzerPipMiss(result, pip, missType, messages));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Checks <see cref="AnalyzerResult.FileOutput"/> for correct analysis on a pip cache miss.
        /// Only the file output of the execution analyzer executable is checked.
        /// Use <see cref="AssertPipMiss(AnalyzerResult, Pip, PipCacheMissType, string[])"/> to additionally
        /// test runtime cache miss analysis output.
        /// </summary>
        /// <param name="pip">The expected pip that had a miss.</param>
        /// <param name="missType">The expected <see cref="PipCacheMissType"/>.</param>
        /// <param name="messages">Expected messages to be printed.</param>
        /// <note>
        /// This is highly inefficient since it does a full pass over the
        /// output file for every assertion.
        /// </note>
        public static AnalyzerResult AssertAnalyzerPipMiss(
            this AnalyzerResult result,
            Pip pip,
            PipCacheMissType missType,
            params string[] messages)
        {
            result.AssertSuccess();

            AssertAnalyzerOutput(result, pip.FormattedSemiStableHash, missType.ToString());
            return(AssertAnalyzerOutput(result, messages));
        }