+ pos = line.find("Compile mode:");
+ if(pos!=string::npos)
+ {
+ string mode = strip(line.substr(pos+13));
+ if(mode=="module")
+ test_case.compile_mode = GL::SL::Compiler::MODULE;
+ else if(mode=="program")
+ test_case.compile_mode = GL::SL::Compiler::PROGRAM;
+ else
+ throw runtime_error("Unknown compile mode "+mode);
+ continue;
+ }
+
+ pos = line.find("Specialize:");
+ if(pos!=string::npos)
+ {
+ vector<string> parts = split(line.substr(pos+11));
+ int value = 0;
+ if(parts[1]=="true")
+ value = 1;
+ else if(parts[1]=="false")
+ value = 0;
+ else
+ value = lexical_cast<int>(parts[1]);
+ test_case.spec_values[parts[0]] = value;
+ continue;
+ }
+