Skip to content
Myr

various tests and infrastructure fixes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent c440a53 · Browse files · 7 files+36 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+36 added−16 removed

  • tests:+19 added−4 removed
  • other:+17 added−12 removed

7 files+36 added−16 removed

modified:tests/stb_cpp.cpp+2 added
50 unmodified lines
51}5253int main(int argc, char **argv)54{55#if 056 char *p;57 p = (char*) "abcdefghijklmnopqrstuvwxyz";58 c(stb_ischar('c', p), "stb_ischar 1");59 c(stb_ischar('x', p), "stb_ischar 2");
13 unmodified lines
73 c(!stb_ischar('c', p), "stb_ischar e");74 c(stb_ischar('x', p), "stb_ischar f");75 c(!stb_ischar('#', p), "stb_ischar g");76 c(stb_ischar('X', p), "stb_ischar h");77#endif7879 test_lex();8081 if (count) {
4 unmodified lines
modified:tests/stb.dsp+5 added-1 removed
64 unmodified lines
65# PROP Intermediate_Dir "Debug\stb"66# PROP Ignore_Export_Lib 067# PROP Target_Dir ""68# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c69# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "VORBIS_TEST" /FR /FD /GZ /c69# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DS_TEST" /FR /FD /GZ /c70# SUBTRACT CPP /YX71# ADD BASE RSC /l 0x409 /d "_DEBUG"72# ADD RSC /l 0x409 /d "_DEBUG"73BSC32=bscmake.exe
151 unmodified lines
225SOURCE=.\test_image_write.c226# End Source File227# Begin Source File228229SOURCE=.\test_packer.c230# End Source File231# Begin Source File232233SOURCE=.\test_perlin.c234# End Source File235# Begin Source File236
20 unmodified lines
modified:tests/test_c_compilation.c+10 added-2 removed
26 unmodified lines
2728#define STBVOX_CONFIG_MODE 129#include "stb_voxel_render.h"3031#define STBTE_DRAW_RECT(x0,y0,x1,y1,color) 032#define STBTE_DRAW_TILE(x,y,id,highlight,data) 031void STBTE_DRAW_RECT(int x0, int y0, int x1, int y1, unsigned int color)32{33}34353637void STBTE_DRAW_TILE(int x0, int y0, unsigned short id, int highlight, float *data)38{39}4041#define STB_TILEMAP_EDITOR_IMPLEMENTATION42#include "stb_tilemap_editor.h"4344
6 unmodified lines
modified:tests/test_ds.c+2 added-1 removed
7 unmodified lines
8//#define STBDS_SIPHASH_2_4 // performance test 1_3 against 2_49//#define STBDS_INTERNAL_BUCKET_START // don't bother offseting differently within bucket for different hash values10//#define STBDS_FLUSH_CACHE (1u<<20) // do this much memory traffic to flush the cache between some benchmarking measurements1112#include <stdio.h>1314#define WIN32_LEAN_AND_MEAN15#include <windows.h>16#define STB_DEFINE17#define STB_NO_REGISTRY18#include "../stb.h"17#include <stdio.h>19#endif2021#ifdef DS_TEST22#define STBDS_UNIT_TESTS
1009 unmodified lines
modified:tools/build_matrix.c+6 added-1 removed
69 unmodified lines
70 ci.compiler_name = strdup(tokens[0]);71 ci.batchfile = strdup(buffer);72 ci.compiler = count==3 ? strdup(tokens[2]) : "cl";73 if (0==strnicmp(batch, "vcvars_", 7))74 ci.objdir = strdup(stb_sprintf("%s_%d", batch+7, i));74 ci.objdir = strdup(stb_sprintf("vs_%s_%d", batch+7, i));75 else76 ci.objdir = strdup(stb_sprintf("%s_%d", batch, i));77 ci.args = shared_args;78 ci.link = shared_link;
41 unmodified lines
120 projects[i].filelist,121 stb_arr_len(compilers[j].link), compilers[j].link);122 r = run_command(compilers[j].batchfile, command);123 stbprint("{%c== Compiler %s == Building %s}\n", r ? '$' : '!', compilers[j].compiler_name, projects[i].filelist);124 stb_copyfile("a.exe", stb_sprintf("obj/%s/a.exe", compilers[j].objdir));125 //printf("Copy: %s to %s\n", "a.exe", stb_sprintf("obj/%s/a.exe", compilers[j].objdir));126 stb_copyfile("temp.exe", stb_sprintf("obj/%s/temp.exe", compilers[j].objdir));127 system("if EXIST a.exe del /q a.exe");128 system("if EXIST temp.exe del /q temp.exe");129 system("if EXIST *.obj del /q *.obj");130 system("if EXIST *.o del /q *.o");131 if (!r)132 return 1;
5 unmodified lines
modified:tools/README.footer.md+4 added-5 removed
modified:tools/README.header.md+7 added-6 removed