mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Add RGBGFX tests
This commit is contained in:
@@ -77,12 +77,23 @@ else(GIT)
|
||||
message(STATUS "Cannot determine RGBDS version (Git not installed), falling back")
|
||||
endif(GIT)
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(MSVC OR NOT PKG_CONFIG_FOUND)
|
||||
# fallback to find_package
|
||||
find_package(PNG REQUIRED)
|
||||
else()
|
||||
pkg_check_modules(LIBPNG REQUIRED libpng)
|
||||
endif()
|
||||
|
||||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
||||
# By default, build in Release mode; Debug mode must be explicitly requested
|
||||
# (You may want to augment it with the options above)
|
||||
|
||||
@@ -14,14 +14,6 @@ set(common_src
|
||||
"_version.c"
|
||||
)
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(MSVC OR NOT PKG_CONFIG_FOUND)
|
||||
# fallback to find_package
|
||||
find_package(PNG REQUIRED)
|
||||
else()
|
||||
pkg_check_modules(LIBPNG REQUIRED libpng)
|
||||
endif()
|
||||
|
||||
find_package(BISON REQUIRED)
|
||||
set(BISON_FLAGS "-Wall")
|
||||
# Set sompe optimization flags on versions that support them
|
||||
@@ -104,8 +96,6 @@ foreach(PROG "asm" "fix" "gfx" "link")
|
||||
install(TARGETS rgb${PROG} RUNTIME DESTINATION bin)
|
||||
endforeach()
|
||||
|
||||
set_target_properties(rgbgfx PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED True)
|
||||
|
||||
if(LIBPNG_FOUND) # pkg-config
|
||||
target_include_directories(rgbgfx PRIVATE ${LIBPNG_INCLUDE_DIRS})
|
||||
target_link_directories(rgbgfx PRIVATE ${LIBPNG_LIBRARY_DIRS})
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
add_executable(randtilegen gfx/randtilegen.c)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(randtilegen PRIVATE -Wno-vla)
|
||||
endif()
|
||||
|
||||
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
||||
|
||||
install(TARGETS randtilegen rgbgfx_test DESTINATION ${rgbds_SOURCE_DIR}/test/gfx)
|
||||
|
||||
foreach(TARGET randtilegen rgbgfx_test)
|
||||
if(LIBPNG_FOUND) # pkg-config
|
||||
target_include_directories(${TARGET} PRIVATE ${LIBPNG_INCLUDE_DIRS})
|
||||
target_link_directories(${TARGET} PRIVATE ${LIBPNG_LIBRARY_DIRS})
|
||||
target_link_libraries(${TARGET} PRIVATE ${LIBPNG_LIBRARIES})
|
||||
else()
|
||||
target_compile_definitions(${TARGET} PRIVATE ${PNG_DEFINITIONS})
|
||||
target_include_directories(${TARGET} PRIVATE ${PNG_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET} PRIVATE ${PNG_LIBRARIES})
|
||||
endif()
|
||||
endforeach()
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
2ä.ü¤CôŃŢpA22ĽVDňĐu2IEUŞä„_Ă/!’ĂpÄÂ�»�!Ňo-/^€áŠuNV0ř�g¬ÂT ú‡?Ó%ëÄIA#1›|Ő$čtt—îĎ„$ ”Wß^`ÄŹŮ�;WĘßJP!÷<pm‹‹»ŽŘ;HZwËűMvUx–ß+ŽŮóće±©„'[$Ś™Ř‹gú˙HcL“äĺ\u·E,ÔĄ_ł‰Á!™äů;lwě?�ÇűĹ?Ü�śk–TĐŽ{Züę˙çARńŰW˱řËř˘h*űbŰŔC$ ÄŢ[2x(űE`�8,Ď=Ě,ᾡ¦ić;¦€ĹŇ7Ç!…ó0¬ĆmđŇäfy+Ńßwk®PYS„˙&Ŕ·WbëAóx¦ęOĺČF\yč«úłr>fŢq.ŐŞ“#Ô]˛i˝µDÇ.mŁÎvĚ<Ô˘»\5cůJWĹN�€=nqţň�gY9úAa™aÇď8?šž“‹~uc§[¨�Ă
|
||||
łó(®“[ qÜć¤B>QMśďzµ_. “pÎr¸–çyö—’wŠ‚ůý~ňsś;ÂMߏŤ]/ähXŚ+6fqťŽÓ0GoűţBE˘đµR„DźßbČŰAm5İůÚńÎćĆgŇßläŹŰ:Híű
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
?x‰œ)&<òavý×(Ë·zصߕx_;½yc&o¸¼$�éw¬ô•x·TST+™îÇ‘X¸þgðàt…�‘¨Ò|cýUJ=»âu<lP¨±>ІÈÍÁ¯[g$Ca„¯IÞ¿îÃsI5;�ÉD2�¤jD[ ¡S+ôÁ¬c¥¤ý8[j�?§�D™Àެ–жÉD,¤é°rãØIÙ½°Nö
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
އ
|
||||
î.[)©(Ýl%€!æÑ»å\Ƕ›W|'R2ìÃÞx”ßé8ÔÏøtUfZŒ]š~àÀÅ®»oZ.žv¾ÃµXc,¢nÏŒÂÃPl8Ã#ïZ<~û?–y%¼SÚ*ÿ,@e&²›ˆXcÄÉŸÒÕå'Äø£�$zOgn™Ã¼¶…7Mb€YÙäy�¤q#c¼SøD©b¨…Ë#ý/×òJnOK¤²AÆ�0bœ•/)Wm¶R&‡�AwW%-ÕÑ>ŠÞ‰þ=Í0êaBéúà¤ùÊy¥1?¹] Àvúb·ÁÝ?A#fæ´d©i²hf¹&–[ \Ï«³ÈÀ+<šojë™?ï ´Ãdšÿ'Óë&fêïæG:pzÎe—ܶÿw;AByÓ[¯é¸L·wÈÝ®FrìÊ-†çÅËrö¤o&ºs̼`fì¢dp€Fån2-†26E¯øªÄ•®èqxÁEzºÚÆ@ÓSÊN5;FÒa ]#ŽitÚR»È !Öµ§¬+6*öÁ3¹Kÿ„¯°F¼Iâ/[ )Ê]åag¸”Ä]J¸Â«×ÂCå5?´�Þó<£8e.ƒäÌí.GM
|
||||
¾édK$¨�R
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
ЅЈКСE6ЬЭ �Љ��*OЦИqяе)ЪіDтД№mыЦeWЧсУиёЫ{Ы3;ПBa��TЌй�јic:ёДKбіЙФ%Я"Жо�.WfІе/ѓSЕћAё+к�Ј��ђnUнч�tr1неD��Ќq.щфЮ(oё`VdК�ЬЬИЖp�uBЛ&д;x<,Т�`\w�rПhЖ§.�ЦЈдC%Vхі_]Р
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ -e ./rgbgfx_test ]] || make -C ../.. test/gfx/rgbgfx_test
|
||||
[[ -e ./randtilegen ]] || make -C ../.. test/gfx/randtilegen
|
||||
|
||||
rc=0
|
||||
for f in *.bin; do
|
||||
./rgbgfx_test "$f" || rc=1
|
||||
done
|
||||
|
||||
exit $rc
|
||||
+1
-1
@@ -14,7 +14,7 @@ fi
|
||||
|
||||
# Tests included with the repository
|
||||
|
||||
for dir in asm link fix; do
|
||||
for dir in asm link fix gfx; do
|
||||
pushd $dir
|
||||
./test.sh
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user