Ejemplo n.º 1
0
        public void QualityBandDefaultsTest()
        {
            InferenceEngine ie = new InferenceEngine();

            Assert.Equal(QualityBand.Experimental, ie.Compiler.RequiredQuality);
            Assert.Equal(QualityBand.Preview, ie.Compiler.RecommendedQuality);

            // Required should latch up Recommended
            ie.Compiler.RequiredQuality = QualityBand.Stable;
            Assert.Equal(QualityBand.Stable, ie.Compiler.RequiredQuality);
            Assert.Equal(QualityBand.Stable, ie.Compiler.RecommendedQuality);

            // Recommended should latch down Required
            ie.Compiler.RequiredQuality    = QualityBand.Mature;
            ie.Compiler.RecommendedQuality = QualityBand.Stable;

            Assert.Equal(QualityBand.Stable, ie.Compiler.RequiredQuality);
            Assert.Equal(QualityBand.Stable, ie.Compiler.RecommendedQuality);

            ie.Compiler.RequiredQuality    = QualityBand.Preview;
            ie.Compiler.RecommendedQuality = QualityBand.Stable;

            Assert.Equal(QualityBand.Preview, ie.Compiler.RequiredQuality);
            Assert.Equal(QualityBand.Stable, ie.Compiler.RecommendedQuality);

            InferenceEngine ie2 = new InferenceEngine();

            ie2.SetTo(ie);

            Assert.Equal(QualityBand.Preview, ie2.Compiler.RequiredQuality);
            Assert.Equal(QualityBand.Stable, ie2.Compiler.RecommendedQuality);
        }