rusi/test/typedef.c

19 lines
777 B
C
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.

#включить "тест.з"
#включить "stdvv.c"
#include "common.c"
типдеф цел МойЦел, МойЦел2[4];
типдеф цел;
цел главн() {
ПРОВЕРИТЬ(1, ({ типдеф цел т; т х=1; х; }));
ПРОВЕРИТЬ(1, ({ типдеф структ {цел а;} т; т х; х.а=1; х.а; }));
ПРОВЕРИТЬ(1, ({ типдеф цел т; т т=1; т; }));
ПРОВЕРИТЬ(2, ({ типдеф структ {цел а;} т; { типдеф цел т; } т х; х.а=2; х.а; }));
ПРОВЕРИТЬ(4, ({ типдеф т; т х; размер(х); }));
ПРОВЕРИТЬ(3, ({ МойЦел х=3; х; }));
ПРОВЕРИТЬ(16, ({ МойЦел2 х; размер(х); }));
printf("OK\n");
возврат 0;
}