#include <debug.h>
#include <list.h>
#include <random.h>
#include <stdio.h>
#include "threads/test.h"
Go to the source code of this file.
Data Structures | |
struct | value |
Defines | |
#define | MAX_SIZE 64 |
Functions | |
static void | shuffle (struct value[], size_t) |
static bool | value_less (const struct list_elem *, const struct list_elem *, void *) |
static void | verify_list_fwd (struct list *, int size) |
static void | verify_list_bkwd (struct list *, int size) |
void | test (void) |
static void | shuffle (struct value *array, size_t cnt) |
static bool | value_less (const struct list_elem *a_, const struct list_elem *b_, void *aux UNUSED) |
static void shuffle | ( | struct | value[], | |
size_t | ||||
) | [static] |
Referenced by test(), and test_main().
void test | ( | void | ) |
Definition at line 36 of file list.c.
References ASSERT, list_begin(), list_end(), list_entry, list_init(), list_insert(), list_insert_ordered(), list_max(), list_min(), list_next(), list_push_back(), list_reverse(), list_sort(), list_unique(), MAX_SIZE, NULL, printf(), random_ulong(), shuffle(), value::value, value_less(), verify_list_bkwd(), and verify_list_fwd().
Referenced by test().
static void verify_list_bkwd | ( | struct list * | list, | |
int | size | |||
) | [static] |
Definition at line 160 of file list.c.
References ASSERT, value::elem, list_entry, list_prev(), list_rbegin(), list_rend(), and value::value.
Referenced by test().
static void verify_list_fwd | ( | struct list * | list, | |
int | size | |||
) | [static] |
Definition at line 141 of file list.c.
References ASSERT, value::elem, list_begin(), list_end(), list_entry, list_next(), and value::value.
Referenced by test().