Mercurial > sdl-ios-xcode
annotate test/automated/SDL_at.h @ 3755:e04d9c69a6fd gsoc2009_unit_tests
Updated README a bit.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 06 Aug 2009 17:00:07 +0000 |
parents | 4a58821c9c98 |
children |
rev | line source |
---|---|
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
1 /* |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
2 * Common code for automated test suite. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
3 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
4 * Written by Edgar Simo "bobbens" |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
5 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
6 * Released under Public Domain. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
7 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
8 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
9 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
10 /** |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
11 * @file SDL_at.h |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
12 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
13 * @brief Handles automatic testing functionality. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
14 * |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
15 * The basic approach with SDL_AT is to divide the tests into what are called |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
16 * test suites and test cases. Each test suite should have multiple test |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
17 * cases, each test case can have multiple asserts. |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
18 * |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
19 * To actually test for conditions within the testcase you check asserts, if |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
20 * the asserts fail the failures will be logged in the testsuite and |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
21 * displayed. |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
22 * |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
23 * Syntax is similar to OpenGL. An example would be: |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
24 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
25 * @code |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
26 * int f; // Number failed |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
27 * SDL_ATinit( "My testsuite" ); |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
28 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
29 * SDL_ATbegin( "My first testcase" ); |
3725
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
30 * if (!SDL_ATassert( (1+1)==2, "Trying '1+1=2'.")) |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
31 * return; // Implicitly calls SDL_ATend if assert fails |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
32 * SDL_ATend(); // Finish testcase |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
33 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
34 * SDL_ATbegin( "My second testcase" ); |
3725
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
35 * if (!SDL_ATassert( (4/2)==2, "Trying '4/2=2'.")) |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
36 * return; // Implicitly calls SDL_ATend if assert fails |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
37 * SDL_ATend(); // Finish testcase |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
38 * |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
39 * f = SDL_ATfinish(); |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
40 * @endcode |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
41 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
42 * @author Edgar Simo "bobbens" |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
43 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
44 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
45 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
46 #ifndef _SDL_AT_H |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
47 # define _SDL_AT_H |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
48 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
49 |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
50 |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
51 enum { |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
52 SDL_AT_VERBOSE, /**< Sets the verbose level. */ |
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
53 SDL_AT_QUIET /**< Sets quietness. */ |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
54 }; |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
55 |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
56 |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
57 /* |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
58 * Suite level actions. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
59 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
60 /** |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
61 * @brief Starts the testsuite. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
62 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
63 * @param suite Name of the suite to start testing. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
64 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
65 void SDL_ATinit( const char *suite ); |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
66 /** |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
67 * @brief Finishes the testsuite printing out global results if verbose. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
68 * |
3751
4a58821c9c98
Improved developer documentation.
Edgar Simo <bobbens@gmail.com>
parents:
3748
diff
changeset
|
69 * @return 0 if no errors occurred, otherwise number of failures. |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
70 */ |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
71 int SDL_ATfinish (void); |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
72 /** |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
73 * @brief Sets a global property value. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
74 * |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
75 * @param property Property to set. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
76 * @param value Value to set property to. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
77 */ |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
78 void SDL_ATseti( int property, int value ); |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
79 /** |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
80 * @brief Gets a global property value. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
81 * |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
82 * @param property Property to get. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
83 * @param[out] value Value of the property. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
84 */ |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
85 void SDL_ATgeti( int property, int *value ); |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
86 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
87 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
88 /* |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
89 * Testcase level actions. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
90 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
91 /** |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
92 * @brief Begins a testcase. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
93 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
94 * @param testcase Name of the testcase to begin. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
95 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
96 void SDL_ATbegin( const char *testcase ); |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
97 /** |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
98 * @brief Checks a condition in the testcase. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
99 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
100 * Will automatically call SDL_ATend if the condition isn't met. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
101 * |
3725
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
102 * @param condition Condition to make sure is true. |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
103 * @param msg Message to display for failure. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
104 * @return Returns 1 if the condition isn't met. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
105 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
106 int SDL_ATassert( const char *msg, int condition ); |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
107 /** |
3725
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
108 * @brief Checks a condition in the testcase. |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
109 * |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
110 * Will automatically call SDL_ATend if the condition isn't met. |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
111 * |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
112 * @param condition Condition to make sure is true. |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
113 * @param msg Message to display for failure with printf style formatting. |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
114 * @return Returns 1 if the condition isn't met. |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
115 */ |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
116 int SDL_ATvassert( int condition, const char *msg, ... ); |
6eca2af6a86b
Added SDL_ATvassert for printf style printing.
Edgar Simo <bobbens@gmail.com>
parents:
3715
diff
changeset
|
117 /** |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
118 * @brief Ends a testcase. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
119 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
120 void SDL_ATend (void); |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
121 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
122 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
123 /* |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
124 * Misc functions. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
125 */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
126 /** |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
127 * @brief Prints an error. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
128 * |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
129 * @param msg printf formatted string to display. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
130 * @return Number of character printed. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
131 */ |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
132 int SDL_ATprintErr( const char *msg, ... ); |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
133 /** |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
134 * @brief Prints some text. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
135 * |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
136 * @param msg printf formatted string to display. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
137 * @return Number of character printed. |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
138 */ |
3748
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
139 #define SDL_ATprint(msg, args...) \ |
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
140 SDL_ATprintVerbose( 0, msg, ## args) |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
141 /** |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
142 * @brief Prints some verbose text. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
143 * |
3748
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
144 * Verbosity levels are as follows: |
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
145 * |
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
146 * - 0 standard stdout, enabled by default |
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
147 * - 1 additional information |
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
148 * - 2 detailed information (spammy) |
9428ae743878
Have SDL_ATprint just call SDL_ATprintVerbose.
Edgar Simo <bobbens@gmail.com>
parents:
3741
diff
changeset
|
149 * |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
150 * @param level Level of verbosity to print at. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
151 * @param msg printf formatted string to display. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
152 * @return Number of character printed. |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
153 */ |
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3725
diff
changeset
|
154 int SDL_ATprintVerbose( int level, const char *msg, ... ); |
3711
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
155 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
156 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
157 #endif /* _SDL_AT_H */ |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
158 |
80839fc6b8e1
First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff
changeset
|
159 |