UFO: Alien Invasion
Loading...
Searching...
No Matches
test_events.cpp File Reference
#include "test_shared.h"
#include "../common/common.h"
#include "../client/battlescape/events/e_parse.h"
#include "../client/cl_shared.h"
#include <string>
Include dependency graph for test_events.cpp:

Go to the source code of this file.

Data Structures

class  EventsTest

Functions

 TEST_F (EventsTest, Range)
 TEST_F (EventsTest, Events)
ScheduleEventPtr Dequeue_Event (int now)
 Finds and returns the first event in the event_queue that is due. If the event has a check function, we check to see if the event can be run now, and skip it if not (even if it is due).
 TEST_F (EventsTest, Scheduler)
static bool delayCheck (int now, void *data)
 TEST_F (EventsTest, SchedulerCheck)
static bool delayCheckBlocked (int now, void *data)
 TEST_F (EventsTest, Blocked)

Variables

static bool delayCheckBlockedVal = false

Function Documentation

◆ delayCheck()

bool delayCheck ( int now,
void * data )
static

Definition at line 83 of file test_events.cpp.

References data.

Referenced by TEST_F().

◆ delayCheckBlocked()

bool delayCheckBlocked ( int now,
void * data )
static

Definition at line 129 of file test_events.cpp.

References data, and delayCheckBlockedVal.

Referenced by TEST_F().

◆ Dequeue_Event()

ScheduleEventPtr Dequeue_Event ( int now)

Finds and returns the first event in the event_queue that is due. If the event has a check function, we check to see if the event can be run now, and skip it if not (even if it is due).

Returns
Returns a pointer to the event, nullptr if none found.

Definition at line 1433 of file common.cpp.

References Delay_Events(), eventQueue, and i.

Referenced by Qcommon_Frame(), TEST_F(), TEST_F(), and TEST_F().

◆ TEST_F() [1/5]

◆ TEST_F() [2/5]

◆ TEST_F() [3/5]

TEST_F ( EventsTest ,
Range  )

Definition at line 43 of file test_events.cpp.

References EV_NUM_EVENTS, and EVENT_INSTANTLY.

◆ TEST_F() [4/5]

TEST_F ( EventsTest ,
Scheduler  )

Definition at line 61 of file test_events.cpp.

References Dequeue_Event(), and Schedule_Event().

◆ TEST_F() [5/5]

TEST_F ( EventsTest ,
SchedulerCheck  )

Definition at line 95 of file test_events.cpp.

References delayCheck(), Dequeue_Event(), and Schedule_Event().

Variable Documentation

◆ delayCheckBlockedVal

bool delayCheckBlockedVal = false
static

Definition at line 128 of file test_events.cpp.

Referenced by delayCheckBlocked(), and TEST_F().