2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
6 #ifndef NATIVE_CLIENT_SRC_SHARED_GIO_GIO_TEST_BASE_H_
7 #define NATIVE_CLIENT_SRC_SHARED_GIO_GIO_TEST_BASE_H_
10 * NaCl Generic I/O test utilities.
13 #include "native_client/src/shared/gio/gio.h"
15 const int expected_file_size = 32;
17 /** Returns character expected to be at file_pos */
18 char GioExpectedCharAt(char initial_char, int file_pos);
21 * Must be given a file with contents:
22 * [initial_char+0, initial_char+1, ..., initial_char+expected_file_size-1]. */
23 void GioReadTestWithOffset(struct Gio* my_file,
26 /** Should be given a scratch file that can be written to without worry. */
27 void GioWriteTest(struct Gio* my_file,
31 * Must be given a file with contents
32 * [initial_char+0, initial_char+1, ..., initial_char+expected_file_size-1].
34 void GioSeekTestWithOffset(struct Gio* my_file,
38 /** Closes and destroys the file. */
39 void GioCloseTest(struct Gio* my_file);
41 #endif /* NATIVE_CLIENT_SRC_SHARED_GIO_GIO_TEST_BASE_H_ */