rusi/test/тест.з

42 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef TEST_H
#define TEST_H
// ============================================================
// АНГЛИЙСКАЯ ВЕРСИЯ
// ============================================================
#define ASSERT(x, y) assert(x, y, #y)
void assert(int expected, int actual, char *code);
int printf(char *fmt, ...);
int sprintf(char *buf, char *fmt, ...);
int vsprintf(char *buf, char *fmt, void *ap);
int strcmp(char *p, char *q);
int strncmp(char *p, char *q, long n);
int memcmp(char *p, char *q, long n);
void exit(int n);
int vsprintf();
long strlen(char *s);
void *memcpy(void *dest, void *src, long n);
void *memset(void *s, int c, long n);
// ============================================================
// РУССКАЯ ВЕРСИЯ (полные дубликаты с русскими именами)
// ============================================================
#определить ПРОВЕРИТЬ(x, y) assert(x, y, #y)
пусто проверить(цел ожидаемое, цел фактическое, символ *код);
цел печать(символ *формат, ...);
цел спечать(символ *буфер, символ *формат, ...);
цел вспечать(символ *буфер, символ *формат, пусто *ap);
цел сравнить_строки(символ *p, символ *q);
цел сравнить_строки_n(символ *p, символ *q, длин n);
цел сравнить_память(символ *p, символ *q, длин n);
пусто завершить(цел n);
цел вспечать();
длин длина_строки(символ *s);
пусто *копировать_память(пусто *назначение, пусто *источник, длин n);
пусто *заполнить_память(пусто *s, цел c, длин n);
#конецесли