put the tests under -DTEST
commitab5b409823e8b7137e49585177cb12536457093c
authorNeil Mitchell <ndmitchell@gmail.com>
dateThu 4 Jan 2018, 22:48 (9 years ago)
parent7b352b6
gen/Main.hs+1−1
@@ -23,7 +23,7 @@ main = do
2323 putStrLn $ rerender src res
2424 writeFileChanged "test.h" $ unlines $ compile html
2525 buildRule ["test.h","test.c"] ["gen" <.> (if isWindows then "exe" else "")] $
26− system_ "gcc test.c -o gen -Werror"
26+ system_ "gcc test.c -o gen -Werror -Wall -Wextra -DTEST"
2727 system_ "gen"
2828
2929writeFileChanged :: FilePath -> String -> IO ()
gen/test.c+4
@@ -409,6 +409,8 @@ document* hexml_document_parse(const char* s, int slen)
409409/////////////////////////////////////////////////////////////////////
410410// TEST HARNESS (temporary)
411411
412+#ifdef TEST
413+
412414static char* resolve(const document* d, str loc)
413415{
414416 char* buf = malloc(loc.length + 3);
@@ -456,6 +458,8 @@ int main()
456458 return 0;
457459}
458460
461+#endif
462+
459463/*
460464void main()
461465{