ringfs
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
Functions | Variables
tests.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <check.h>
#include "ringfs.h"
#include "flashsim.h"

Go to the source code of this file.

Functions

 START_TEST (test_flashsim)
 
static int op_sector_erase (int address)
 
static ssize_t op_program (int address, const void *data, size_t size)
 
static ssize_t op_read (int address, void *data, size_t size)
 
 START_TEST (test_ringfs_format)
 
END_TEST START_TEST (test_ringfs_scan)
 
END_TEST START_TEST (test_ringfs_append)
 
END_TEST START_TEST (test_ringfs_discard)
 
END_TEST START_TEST (test_ringfs_capacity)
 
END_TEST START_TEST (test_ringfs_count)
 
END_TEST Suite * ringfs_suite (void)
 
int main ()
 

Variables

static END_TEST struct flashsimsim
 
static const struct
ringfs_flash_partition 
flash
 

Function Documentation

int main ( )

Definition at line 346 of file tests.c.

static ssize_t op_program ( int  address,
const void *  data,
size_t  size 
)
static

Definition at line 69 of file tests.c.

static ssize_t op_read ( int  address,
void *  data,
size_t  size 
)
static

Definition at line 75 of file tests.c.

static int op_sector_erase ( int  address)
static

Definition at line 63 of file tests.c.

END_TEST Suite* ringfs_suite ( void  )

Definition at line 325 of file tests.c.

START_TEST ( test_flashsim  )

Definition at line 20 of file tests.c.

START_TEST ( test_ringfs_format  )

Definition at line 91 of file tests.c.

END_TEST START_TEST ( test_ringfs_scan  )

Definition at line 104 of file tests.c.

END_TEST START_TEST ( test_ringfs_append  )

Definition at line 153 of file tests.c.

END_TEST START_TEST ( test_ringfs_discard  )

Definition at line 200 of file tests.c.

END_TEST START_TEST ( test_ringfs_capacity  )

Definition at line 244 of file tests.c.

END_TEST START_TEST ( test_ringfs_count  )

Definition at line 258 of file tests.c.

Variable Documentation

const struct ringfs_flash_partition flash
static
Initial value:
= {
.sector_size = 65536,
.sector_offset = 3,
.sector_count = 13,
.sector_erase = op_sector_erase,
.program = op_program,
.read = op_read,
}
static ssize_t op_read(int address, void *data, size_t size)
Definition: tests.c:75
static ssize_t op_program(int address, const void *data, size_t size)
Definition: tests.c:69
static int op_sector_erase(int address)
Definition: tests.c:63

Definition at line 81 of file tests.c.

END_TEST struct flashsim* sim
static

Definition at line 61 of file tests.c.