Defines | Functions

tests/test_image_modifications.cpp File Reference

#include <boost/test/unit_test.hpp>
#include <sstream>
#include "game_config.hpp"
#include "config_cache.hpp"
#include "config.hpp"
#include "color_range.hpp"
#include "image.hpp"
#include "image_modifications.hpp"
#include "log.hpp"
#include "filesystem.hpp"
Include dependency graph for test_image_modifications.cpp:

Go to the source code of this file.

Defines

#define GETTEXT_DOMAIN   "wesnoth-test"

Functions

 BOOST_AUTO_TEST_CASE (test_modificaiton_queue_order)
 Tests if modifications with a higher priority are placed before the others.
 BOOST_AUTO_TEST_CASE (test_tc_modification_decoding)
 Tests if the TC modification is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_tc_modification_decoding_invalid_args)
 Tests if the TC modification with invalid arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_rc_modification_decoding)
 Tests if the RC modification is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_rc_modification_decoding_invalid_args)
 Tests if the RC modification with invalid arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_pal_modification_decoding)
 Tests if the PAL modification is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_pal_modification_decoding_invalid_args)
 Tests if the PAL modification with invalid arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_fl_modification_decoding_default)
 Tests if the FL modification is correctly decoded without arguments.
 BOOST_AUTO_TEST_CASE (test_fl_modification_decoding_horiz)
 Tests if the FL modification is correctly decoded with the horiz argument.
 BOOST_AUTO_TEST_CASE (test_fl_modification_decoding_vert)
 Tests if the FL modification is correctly decoded with the vert argument.
 BOOST_AUTO_TEST_CASE (test_fl_modification_decoding_horiz_and_vert)
 Tests if the FL modification is correctly decoded with both horiz and vert.
 BOOST_AUTO_TEST_CASE (test_gs_modification_decoding)
 Tests if the GS modification is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_crop_modification_decoding_no_args)
 Tests if the CROP modification without arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_crop_modification_decoding_1_arg)
 Tests if the CROP modification is correctly decoded when given one argument.
 BOOST_AUTO_TEST_CASE (test_crop_modification_decoding_2_args)
 Tests if the CROP modification is correctly decoded when given two args.
 BOOST_AUTO_TEST_CASE (test_crop_modification_decoding_3_args)
 Tests if the CROP modification is correctly decoded when given three args.
 BOOST_AUTO_TEST_CASE (test_crop_modification_decoding_4_args)
 Tests if the CROP modification is correctly decoded when given four args.
 BOOST_AUTO_TEST_CASE (test_blit_modification_decoding_1_arg)
 Tests if the BLIT modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_blit_modification_decoding_3_args)
 Tests if the BLIT modification with three arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_blit_modification_decoding_invalid_args)
 Tests if the BLIT modification with invalid arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_mask_modification_decoding_1_arg)
 Tests if the MASK modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_mask_modification_decoding_3_args)
 Tests if the MASK modification with three arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_mask_modification_decoding_invalid_args)
 Tests if the MASK modification with invalid arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_l_modification_decoding_no_args)
 Tests if the L modification without arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_l_modification_decoding_1_arg)
 Tests if the L modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_scale_modification_decoding_no_args)
 Tests if the SCALE modification without arguments is ignored.
 BOOST_AUTO_TEST_CASE (test_scale_modification_decoding_1_arg)
 Tests if the SCALE modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_scale_modification_decoding_2_args)
 Tests if the SCALE modification with two arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_o_modification_decoding_percent_args)
 Tests if the O modification with a percent argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_o_modification_decoding_fraction_args)
 Tests if the O modification with a fraction argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bl_modification_decoding_no_args)
 Tests if the BL modification without arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bl_modification_decoding)
 Tests if the BL modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_rgb_modification_decoding_no_args)
 Tests if the R, G and B modifications without args are correctly decoded.
 BOOST_AUTO_TEST_CASE (test_r_modification_decoding)
 Tests if the R modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_g_modification_decoding)
 Tests if the G modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_b_modification_decoding)
 Tests if the B modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_brighten_modification_decoding)
 Tests if the BRIGHTEN modification is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_draken_modification_decoding)
 Tests if the DARKEN modification is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bg_modification_decoding_no_args)
 Tests if the BG modification without arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bg_modification_decoding_1_arg)
 Tests if the BG modification with one argument is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bg_modification_decoding_2_args)
 Tests if the BG modification with two arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bg_modification_decoding_3_args)
 Tests if the BG modification with three arguments is correctly decoded.
 BOOST_AUTO_TEST_CASE (test_bg_modification_decoding_4_args)
 Tests if the BG modification with four arguments is correctly decoded.

Define Documentation

#define GETTEXT_DOMAIN   "wesnoth-test"

Definition at line 16 of file test_image_modifications.cpp.


Function Documentation

BOOST_AUTO_TEST_CASE ( test_modificaiton_queue_order   ) 

Tests if modifications with a higher priority are placed before the others.

The RC modification has a higher priority than other modifications and has to be applied before all the others. This test checks if that order is taken care of by the queue.

Definition at line 133 of file test_image_modifications.cpp.

BOOST_AUTO_TEST_CASE ( test_bg_modification_decoding_4_args   ) 

Tests if the BG modification with four arguments is correctly decoded.

Definition at line 974 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_bg_modification_decoding_3_args   ) 

Tests if the BG modification with three arguments is correctly decoded.

Definition at line 952 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_bg_modification_decoding_2_args   ) 

Tests if the BG modification with two arguments is correctly decoded.

Definition at line 930 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_bg_modification_decoding_1_arg   ) 

Tests if the BG modification with one argument is correctly decoded.

Definition at line 908 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_bg_modification_decoding_no_args   ) 

Tests if the BG modification without arguments is correctly decoded.

Definition at line 886 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_draken_modification_decoding   ) 

Tests if the DARKEN modification is correctly decoded.

Definition at line 869 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_brighten_modification_decoding   ) 

Tests if the BRIGHTEN modification is correctly decoded.

Definition at line 852 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_b_modification_decoding   ) 

Tests if the B modification with one argument is correctly decoded.

Definition at line 831 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_g_modification_decoding   ) 

Tests if the G modification with one argument is correctly decoded.

Definition at line 810 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_r_modification_decoding   ) 

Tests if the R modification with one argument is correctly decoded.

Definition at line 789 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_rgb_modification_decoding_no_args   ) 

Tests if the R, G and B modifications without args are correctly decoded.

Definition at line 762 of file test_image_modifications.cpp.

References image::modification::decode(), image::cs_modification::get_b(), image::cs_modification::get_g(), and image::cs_modification::get_r().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_bl_modification_decoding   ) 

Tests if the BL modification with one argument is correctly decoded.

Definition at line 743 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_bl_modification_decoding_no_args   ) 

Tests if the BL modification without arguments is correctly decoded.

Definition at line 724 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_o_modification_decoding_fraction_args   ) 

Tests if the O modification with a fraction argument is correctly decoded.

Definition at line 704 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_o_modification_decoding_percent_args   ) 

Tests if the O modification with a percent argument is correctly decoded.

Definition at line 684 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_scale_modification_decoding_2_args   ) 

Tests if the SCALE modification with two arguments is correctly decoded.

Definition at line 664 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_scale_modification_decoding_1_arg   ) 

Tests if the SCALE modification with one argument is correctly decoded.

Definition at line 644 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_scale_modification_decoding_no_args   ) 

Tests if the SCALE modification without arguments is ignored.

Definition at line 634 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_l_modification_decoding_1_arg   ) 

Tests if the L modification with one argument is correctly decoded.

Todo:
check if the surface is correct

Definition at line 615 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_l_modification_decoding_no_args   ) 

Tests if the L modification without arguments is ignored.

Definition at line 602 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_mask_modification_decoding_invalid_args   ) 

Tests if the MASK modification with invalid arguments is ignored.

Definition at line 588 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_mask_modification_decoding_3_args   ) 

Tests if the MASK modification with three arguments is correctly decoded.

Todo:
check if the surface is correct

Definition at line 567 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_mask_modification_decoding_1_arg   ) 

Tests if the MASK modification with one argument is correctly decoded.

Todo:
check if the surface is correct

Definition at line 543 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_blit_modification_decoding_invalid_args   ) 

Tests if the BLIT modification with invalid arguments is ignored.

Definition at line 526 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_blit_modification_decoding_3_args   ) 

Tests if the BLIT modification with three arguments is correctly decoded.

Todo:
check if the surface is correct

Definition at line 505 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_blit_modification_decoding_1_arg   ) 

Tests if the BLIT modification with one argument is correctly decoded.

Todo:
check if the surface is correct

Definition at line 481 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_crop_modification_decoding_4_args   ) 

Tests if the CROP modification is correctly decoded when given four args.

Definition at line 454 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_crop_modification_decoding_3_args   ) 

Tests if the CROP modification is correctly decoded when given three args.

Definition at line 430 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_crop_modification_decoding_2_args   ) 

Tests if the CROP modification is correctly decoded when given two args.

Definition at line 406 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_crop_modification_decoding_1_arg   ) 

Tests if the CROP modification is correctly decoded when given one argument.

Definition at line 382 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_crop_modification_decoding_no_args   ) 

Tests if the CROP modification without arguments is ignored.

Definition at line 372 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_gs_modification_decoding   ) 

Tests if the GS modification is correctly decoded.

Definition at line 355 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_fl_modification_decoding_horiz_and_vert   ) 

Tests if the FL modification is correctly decoded with both horiz and vert.

Definition at line 335 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_fl_modification_decoding_vert   ) 

Tests if the FL modification is correctly decoded with the vert argument.

Definition at line 315 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_fl_modification_decoding_horiz   ) 

Tests if the FL modification is correctly decoded with the horiz argument.

Definition at line 295 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_fl_modification_decoding_default   ) 

Tests if the FL modification is correctly decoded without arguments.

Definition at line 275 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_pal_modification_decoding_invalid_args   ) 

Tests if the PAL modification with invalid arguments is ignored.

Definition at line 264 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_pal_modification_decoding   ) 

Tests if the PAL modification is correctly decoded.

Definition at line 234 of file test_image_modifications.cpp.

References image::modification::decode(), and game_config::tc_info().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_rc_modification_decoding_invalid_args   ) 

Tests if the RC modification with invalid arguments is ignored.

Definition at line 224 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_rc_modification_decoding   ) 

Tests if the RC modification is correctly decoded.

Definition at line 201 of file test_image_modifications.cpp.

References game_config::color_info(), image::modification::decode(), recolor_range(), and game_config::tc_info().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_tc_modification_decoding_invalid_args   ) 

Tests if the TC modification with invalid arguments is ignored.

Definition at line 191 of file test_image_modifications.cpp.

References image::modification::decode().

Here is the call graph for this function:

BOOST_AUTO_TEST_CASE ( test_tc_modification_decoding   ) 

Tests if the TC modification is correctly decoded.

Definition at line 167 of file test_image_modifications.cpp.

References game_config::color_info(), image::modification::decode(), recolor_range(), and game_config::tc_info().

Here is the call graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:10:42 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs