1cb93a386Sopenharmony_ciuniform half4 colorGreen, colorRed; 2cb93a386Sopenharmony_ci 3cb93a386Sopenharmony_cihalf4 main(float2 coords) { 4cb93a386Sopenharmony_ci const bool TRUE = true; 5cb93a386Sopenharmony_ci const bool FALSE = false; 6cb93a386Sopenharmony_ci 7cb93a386Sopenharmony_ci bool ok = true; 8cb93a386Sopenharmony_ci 9cb93a386Sopenharmony_ci // Literal test 10cb93a386Sopenharmony_ci ok = ok && (true ? true : false); 11cb93a386Sopenharmony_ci ok = ok && (false ? false : true); 12cb93a386Sopenharmony_ci 13cb93a386Sopenharmony_ci // Constant boolean test 14cb93a386Sopenharmony_ci ok = ok && (TRUE ? true : false); 15cb93a386Sopenharmony_ci ok = ok && (FALSE ? false : true); 16cb93a386Sopenharmony_ci 17cb93a386Sopenharmony_ci // Constant-foldable test 18cb93a386Sopenharmony_ci ok = ok && (1 == 1 ? true : false); 19cb93a386Sopenharmony_ci ok = ok && (0 == 1 ? false : true); 20cb93a386Sopenharmony_ci 21cb93a386Sopenharmony_ci // Unknown-value test 22cb93a386Sopenharmony_ci ok = ok && (colorGreen.g == 1 ? true : false); 23cb93a386Sopenharmony_ci ok = ok && (colorGreen.r == 1 ? false : true); 24cb93a386Sopenharmony_ci 25cb93a386Sopenharmony_ci return ok ? colorGreen : colorRed; 26cb93a386Sopenharmony_ci} 27