llvm/libc/test/src/__support/File/file_test.cpp

//===-- Unittests for platform independent file class ---------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/__support/CPP/new.h"
#include "src/__support/File/file.h"
#include "src/__support/error_or.h"
#include "test/UnitTest/MemoryMatcher.h"
#include "test/UnitTest/Test.h"

#include <stdio.h>
#include <stdlib.h>

ModeFlags;
MemoryView;
ErrorOr;
File;
FileIOResult;

class StringFile : public File {};

FileIOResult StringFile::str_read(LIBC_NAMESPACE::File *f, void *data,
                                  size_t len) {}

FileIOResult StringFile::str_write(LIBC_NAMESPACE::File *f, const void *data,
                                   size_t len) {}

ErrorOr<off_t> StringFile::str_seek(LIBC_NAMESPACE::File *f, off_t offset,
                                    int whence) {}

StringFile *new_string_file(char *buffer, size_t buflen, int bufmode,
                            bool owned, const char *mode) {}

TEST(LlvmLibcFileTest, WriteOnly) {}

TEST(LlvmLibcFileTest, WriteLineBuffered) {}

TEST(LlvmLibcFileTest, WriteUnbuffered) {}

TEST(LlvmLibcFileTest, ReadOnly) {}

TEST(LlvmLibcFileTest, ReadSeekCurAndRead) {}

TEST(LlvmLibcFileTest, AppendOnly) {}

TEST(LlvmLibcFileTest, WriteUpdate) {}

TEST(LlvmLibcFileTest, ReadUpdate) {}

TEST(LlvmLibcFileTest, AppendUpdate) {}

TEST(LlvmLibcFileTest, SmallBuffer) {}

TEST(LlvmLibcFileTest, ZeroLengthBuffer) {}

TEST(LlvmLibcFileTest, WriteNothing) {}