0.7.0 rewrite dev
- remove everyting - keep core -rename bit_utils to bits - add formatter for color - add float getters to color - start with new drivers api
This commit is contained in:
6
tests/core/CMakeLists.txt
Normal file
6
tests/core/CMakeLists.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(core-tests)
|
||||
|
||||
add_executable(core-tests ${CMAKE_CURRENT_SOURCE_DIR}/source/main.cpp)
|
||||
target_link_libraries(core-tests PRIVATE palladium::palladium)
|
||||
28
tests/core/source/main.cpp
Normal file
28
tests/core/source/main.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <iostream>
|
||||
#include <palladium>
|
||||
|
||||
bool ColorTests() {
|
||||
PD::Color color = PD::Color(65, 32, 45, 240);
|
||||
std::cout << "PD Color Tests:" << std::endl;
|
||||
std::cout << "Input: Color(65, 32, 45, 240)\n";
|
||||
std::cout << std::format(" RGB: {:rgb}", color) << std::endl;
|
||||
std::cout << std::format(" RGBF: {:rgbf}", color) << std::endl;
|
||||
std::cout << std::format(" RGBA: {:rgba}", color) << std::endl;
|
||||
std::cout << std::format(" RGBAF: {:rgbaf}", color) << std::endl;
|
||||
std::cout << std::format(" Hex: {:hex}", color) << std::endl;
|
||||
std::cout << "Input: Color(0.1f, 0.3f, 0.4f, 0.9f)\n";
|
||||
color = PD::Color(0.1f, 0.3f, 0.4f, 0.9f);
|
||||
std::cout << std::format(" RGB: {:rgb}", color) << std::endl;
|
||||
std::cout << std::format(" RGBF: {:rgbf}", color) << std::endl;
|
||||
std::cout << std::format(" RGBA: {:rgba}", color) << std::endl;
|
||||
std::cout << std::format(" RGBAF: {:rgbaf}", color) << std::endl;
|
||||
std::cout << std::format(" Hex: {:hex}", color) << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
PD::Os::UseDriver<PD::OsDriver>();
|
||||
ColorTests();
|
||||
std::cout << PD::Os::GetTime() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user