示例#1
0
class FileNotFound(expect.ErrorMessage):
    """Tests the error message if a file cannot be found."""

    blabla_file = TempFileName('blabla.frag')
    glslc_args = [blabla_file]
    expected_error = [
        "glslc: error: cannot open input file: '", blabla_file,
        "': No such file or directory\n"]
示例#2
0
class OutputFileLocation(expect.SuccessfulReturn,
                         expect.CorrectObjectFilePreamble):
    """Tests that the -o flag puts a file in a new location."""

    shader = FileShader('#version 310 es\nvoid main() {}', '.frag')
    glslc_args = [shader, '-o', TempFileName('a.out')]

    def check_output_a_out(self, status):
        output_name = os.path.join(status.directory, 'a.out')
        return self.verify_object_file_preamble(output_name)