bool TestExtFile::test_vfprintf() { Variant f = f_fopen("test/test_ext_file.tmp", "w"); f_vfprintf(f, "%s %s", CREATE_VECTOR2("testing", "vfprintf")); f_fclose(f); f = f_fopen("test/test_ext_file.tmp", "r"); VF(f, "testing vfprintf"); return Count(true); }
bool TestExtFile::test_fwrite() { Variant f = f_fopen("test/test_ext_file.tmp", "w"); f_fwrite(f, "testing fwrite", 7); f_fclose(f); f = f_fopen("test/test_ext_file.tmp", "r"); VF(f, "testing"); return Count(true); }
bool TestExtFile::test_fputs() { Variant f = f_fopen("test/ext/test_ext_file.tmp", "w"); f_fputs(f, "testing fputs"); f_fclose(f); f = f_fopen("test/ext/test_ext_file.tmp", "r"); VF(f, "testing fputs"); return Count(true); }
bool TestExtFile::test_fputcsv() { Array fields = CREATE_VECTOR2("apple", "\"banana\""); Variant f = f_fopen("test/test_ext_file.tmp", "w"); f_fputcsv(f, fields); f_fclose(f); f = f_fopen("test/test_ext_file.tmp", "r"); VF(f, "apple,\"\"\"banana\"\"\"\n"); return Count(true); }
#define VF_x(pf, type, size, bgra) 0 #define VF_A(pf, type, size, bgra) \ NVXX_3D_VAF_SIZE(size) | NVXX_3D_VAF_TYPE(type) | (bgra << 31) #define VF(c, pf, type, size, bgra) \ [PIPE_FORMAT_##pf] = { \ VF_##c(pf, type, size, bgra), \ PIPE_BIND_VERTEX_BUFFER \ } #if NOUVEAU_DRIVER == 0xc0 const struct nvc0_vertex_format nvc0_vertex_format[PIPE_FORMAT_COUNT] = #else const struct nv50_vertex_format nv50_vertex_format[PIPE_FORMAT_COUNT] = #endif { VF(A, B8G8R8A8_UNORM, UNORM, 8_8_8_8, 1), VF(A, R8G8B8A8_UNORM, UNORM, 8_8_8_8, 0), VF(A, R10G10B10A2_UNORM, UNORM, 10_10_10_2, 0), VF(A, B10G10R10A2_UNORM, UNORM, 10_10_10_2, 1), VF(A, R10G10B10A2_SNORM, SNORM, 10_10_10_2, 0), VF(A, B10G10R10A2_SNORM, SNORM, 10_10_10_2, 1), VF(A, R10G10B10A2_UINT, UINT, 10_10_10_2, 0), VF(A, B10G10R10A2_UINT, UINT, 10_10_10_2, 1), VF(A, R11G11B10_FLOAT, FLOAT, 11_11_10, 0), VF(A, R32G32B32A32_FLOAT, FLOAT, 32_32_32_32, 0), VF(A, R32G32B32A32_UNORM, UNORM, 32_32_32_32, 0), VF(A, R32G32B32A32_SNORM, SNORM, 32_32_32_32, 0), VF(A, R32G32B32A32_SINT, SINT, 32_32_32_32, 0),