syncfiles/lib/test.h
Dietrich Epp d5bfaa510a Clean up Mac OS GUI code
Include paths are updated to include the directory. It seems that
CodeWarrior will search for include files recursively, which means that
"error.h" may resolve to the wrong file (there are two). I am unsure of
the rules CodeWarrior uses to find header files.

Support for older versions of Universal Interfaces has been added.

The project code has been reworked after thoroughly reviewing Inside
Macintosh: Files. It is not complete, but it compiles, and the behavior
of the Save / Save As commands have been thought out more carefully.
2022-11-16 18:19:05 -05:00

31 lines
890 B
C

// Copyright 2022 Dietrich Epp.
// This file is part of SyncFiles. SyncFiles is licensed under the terms of the
// Mozilla Public License, version 2.0. See LICENSE.txt for details.
#ifndef LIB_TEST_H
#define LIB_TEST_H
// test.h - unit testing definitions.
#include "lib/defs.h"
#include "lib/error.h"
// The number of test failures.
extern int gFailCount;
// Set the name of the current test.
void SetTestName(const char *name);
// Set the name of the current test.
void SetTestNamef(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
// Fail the current test.
void Failf(const char *msg, ...) __attribute__((format(printf, 1, 2)));
// Return the description of an error code. Fatal error if the error code is
// invalid.
const char *ErrorDescriptionOrDie(ErrorCode err);
// Print information about completed tests and return the status code.
int TestsDone(void);
#endif