コード例 #1
0
        public void CanDoSemanticAnalysisForUnresolvedSymbol()
        {
            var shaderText = @"void main() { float a = unres; }";

            ShaderFile file = ShaderFile.CreateFromText(shaderText);

            Assert.IsNotNull(file.SemanticContext);
            Assert.AreEqual(2, file.SemanticContext.Model.NodeSymbols.Count);
        }
コード例 #2
0
        public void CanDoSemanticAnalysisForVariableDeclaration()
        {
            var shaderText = @"in vec3 var1, var2;";

            ShaderFile file = ShaderFile.CreateFromText(shaderText);

            Assert.IsNotNull(file.SemanticContext);
            Assert.AreEqual(2, file.SemanticContext.Model.NodeSymbols.Count);
        }