From 54a697d0bcf0ef185a8c03cbffd5678a842ec45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sun, 10 Jul 2011 00:24:09 -0400 Subject: [PATCH] cunit: added bitmap test template --- cunit/CMakeLists.txt | 2 ++ cunit/test_bitmap.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ cunit/test_bitmap.h | 26 +++++++++++++++++++++++ cunit/test_freerdp.c | 6 ++++++ 4 files changed, 83 insertions(+) create mode 100644 cunit/test_bitmap.c create mode 100644 cunit/test_bitmap.h diff --git a/cunit/CMakeLists.txt b/cunit/CMakeLists.txt index 108d27d09..4ff394cfc 100644 --- a/cunit/CMakeLists.txt +++ b/cunit/CMakeLists.txt @@ -33,6 +33,8 @@ add_executable(test_freerdp test_mcs.h test_color.c test_color.h + test_bitmap.c + test_bitmap.h test_libgdi.c test_libgdi.h test_list.c diff --git a/cunit/test_bitmap.c b/cunit/test_bitmap.c new file mode 100644 index 000000000..504a5a6df --- /dev/null +++ b/cunit/test_bitmap.c @@ -0,0 +1,49 @@ +/** + * FreeRDP: A Remote Desktop Protocol Client + * Bitmap Unit Tests + * + * Copyright 2011 Jay Sorg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +#include "test_bitmap.h" + +int init_bitmap_suite(void) +{ + return 0; +} + +int clean_bitmap_suite(void) +{ + return 0; +} + +int add_bitmap_suite(void) +{ + add_test_suite(bitmap); + + add_test_function(bitmap); + + return 0; +} + +void test_bitmap(void) +{ + +} + diff --git a/cunit/test_bitmap.h b/cunit/test_bitmap.h new file mode 100644 index 000000000..3705e0930 --- /dev/null +++ b/cunit/test_bitmap.h @@ -0,0 +1,26 @@ +/** + * FreeRDP: A Remote Desktop Protocol Client + * Bitmap Unit Tests + * + * Copyright 2011 Jay Sorg + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "test_freerdp.h" + +int init_bitmap_suite(void); +int clean_bitmap_suite(void); +int add_bitmap_suite(void); + +void test_bitmap(void); diff --git a/cunit/test_freerdp.c b/cunit/test_freerdp.c index 73c354060..6da5a8d7a 100644 --- a/cunit/test_freerdp.c +++ b/cunit/test_freerdp.c @@ -24,6 +24,7 @@ #include "test_gcc.h" #include "test_mcs.h" #include "test_color.h" +#include "test_bitmap.h" #include "test_libgdi.h" #include "test_list.h" #include "test_stream.h" @@ -115,6 +116,7 @@ int main(int argc, char* argv[]) add_gcc_suite(); add_mcs_suite(); add_color_suite(); + add_bitmap_suite(); add_libgdi_suite(); add_list_suite(); add_stream_suite(); @@ -130,6 +132,10 @@ int main(int argc, char* argv[]) { add_color_suite(); } + if (strcmp("bitmap", argv[*pindex]) == 0) + { + add_bitmap_suite(); + } else if (strcmp("libgdi", argv[*pindex]) == 0) { add_libgdi_suite();