Lines Matching refs:file

5  *  that can be found in the LICENSE file in the root of the source
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
48 // This file (used in some tests) contains binary data. The data correspond to
54 // This file (used in some tests) contains binary data. The data correspond to
141 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
143 file->OpenFile(test_filename.c_str(),
147 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
153 EXPECT_EQ(kBufferLength, ReadInt16BufferFromFile(file.get(),
160 file->Rewind();
163 // needed in the file, but reads to the end, and it returns the number of
167 EXPECT_EQ(kBufferLength, ReadInt16BufferFromFile(file.get(),
185 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
187 file->OpenFile(test_filename.c_str(),
191 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
197 EXPECT_EQ(kBufferLength, ReadInt16FromFileToFloatBuffer(file.get(),
206 file->Rewind();
209 // needed in the file, but reads to the end, and it returns the number of
214 ReadInt16FromFileToFloatBuffer(file.get(),
232 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
234 file->OpenFile(test_filename.c_str(),
238 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
244 EXPECT_EQ(kBufferLength, ReadInt16FromFileToDoubleBuffer(file.get(),
252 file->Rewind();
255 // needed in the file, but reads to the end, and it returns the number of
260 ReadInt16FromFileToDoubleBuffer(file.get(),
277 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
279 file->OpenFile(test_filename.c_str(),
283 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
289 EXPECT_EQ(kBufferLength, ReadFloatBufferFromFile(file.get(),
296 file->Rewind();
299 // needed in the file, but reads to the end, and it returns the number of
303 EXPECT_EQ(kBufferLength, ReadFloatBufferFromFile(file.get(),
319 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
321 file->OpenFile(test_filename.c_str(),
325 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
331 EXPECT_EQ(kBufferLength, ReadDoubleBufferFromFile(file.get(),
338 file->Rewind();
341 // needed in the file, but reads to the end, and it returns the number of
345 EXPECT_EQ(kBufferLength, ReadDoubleBufferFromFile(file.get(),
359 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
364 file->OpenFile(kOutFileName.c_str(),
368 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
379 EXPECT_EQ(kBufferLength, WriteInt16BufferToFile(file.get(),
383 file->CloseFile();
385 file->OpenFile(kOutFileName.c_str(),
389 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
392 EXPECT_EQ(kBufferLength, ReadInt16BufferFromFile(file.get(),
406 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
411 file->OpenFile(kOutFileName.c_str(),
415 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
426 EXPECT_EQ(kBufferLength, WriteFloatBufferToFile(file.get(),
430 file->CloseFile();
432 file->OpenFile(kOutFileName.c_str(),
436 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
439 EXPECT_EQ(kBufferLength, ReadFloatBufferFromFile(file.get(),
453 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
458 file->OpenFile(kOutFileName.c_str(),
462 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
473 EXPECT_EQ(kBufferLength, WriteDoubleBufferToFile(file.get(),
477 file->CloseFile();
479 file->OpenFile(kOutFileName.c_str(),
483 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
486 EXPECT_EQ(kBufferLength, ReadDoubleBufferFromFile(file.get(),
505 rtc::scoped_ptr<FileWrapper> file(FileWrapper::Create());
512 // Tests with file not opened.
513 EXPECT_EQ(0u, ReadInt16BufferFromFile(file.get(), 1, int16_buffer.get()));
514 EXPECT_EQ(0u, ReadInt16FromFileToDoubleBuffer(file.get(),
517 EXPECT_EQ(0u, ReadDoubleBufferFromFile(file.get(), 1, double_buffer.get()));
518 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, int16_buffer.get()));
519 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, double_buffer.get()));
521 file->OpenFile(test_filename.c_str(),
525 ASSERT_TRUE(file->Open()) << "File could not be opened:\n"
529 EXPECT_EQ(0u, ReadInt16BufferFromFile(file.get(), 1, NULL));
530 EXPECT_EQ(0u, ReadInt16BufferFromFile(file.get(), 0, int16_buffer.get()));
533 EXPECT_EQ(0u, ReadInt16FromFileToDoubleBuffer(file.get(), 1, NULL));
534 EXPECT_EQ(0u, ReadInt16FromFileToDoubleBuffer(file.get(),
539 EXPECT_EQ(0u, ReadDoubleBufferFromFile(file.get(), 1, NULL));
540 EXPECT_EQ(0u, ReadDoubleBufferFromFile(file.get(), 0, double_buffer.get()));
543 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 1, NULL));
544 EXPECT_EQ(0u, WriteInt16BufferToFile(file.get(), 0, int16_buffer.get()));
547 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 1, NULL));
548 EXPECT_EQ(0u, WriteDoubleBufferToFile(file.get(), 0, double_buffer.get()));