Lines Matching refs:std
39 std::string FileNameAsCustomTestSuffix(
40 const ::testing::TestParamInfo<std::string>& info)
42 std::string name = info.param;
44 std::replace(name.begin(), name.end(), '.', '_');
45 std::replace(name.begin(), name.end(), '-', '_');
49 EShLanguage GetShaderStage(const std::string& stage)
124 std::pair<bool, std::string> ReadFile(const std::string& path)
126 std::ifstream fstream(path, std::ios::in);
128 std::string contents;
129 fstream.seekg(0, std::ios::end);
130 contents.reserve((std::string::size_type)fstream.tellg());
131 fstream.seekg(0, std::ios::beg);
132 contents.assign((std::istreambuf_iterator<char>(fstream)),
133 std::istreambuf_iterator<char>());
134 return std::make_pair(true, contents);
136 return std::make_pair(false, "");
139 std::pair<bool, std::vector<std::uint32_t> > ReadSpvBinaryFile(const std::string& path)
141 std::ifstream fstream(path, std::fstream::in | std::fstream::binary);
144 return std::make_pair(false, std::vector<std::uint32_t>());
146 std::vector<std::uint32_t> contents;
150 contents.reserve(size_t(fstream.tellg()) / sizeof(std::uint32_t));
155 std::uint32_t inWord;
162 return std::make_pair(true, contents); // hopefully, c++11 move semantics optimizes the copy away.
165 bool WriteFile(const std::string& path, const std::string& contents)
167 std::ofstream fstream(path, std::ios::out);
174 std::string GetSuffix(const std::string& name)
177 return (pos == std::string::npos) ? "" : name.substr(name.rfind('.') + 1);