Mercurial > public > fructose_gen
comparison README.markdown @ 1:62a54c46da31
Tweaking README file.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 19 Mar 2011 20:00:04 -0500 |
parents | d098192f01d9 |
children |
comparison
equal
deleted
inserted
replaced
0:d098192f01d9 | 1:62a54c46da31 |
---|---|
55 | 55 |
56 `fructose_gen.py` is not a true C++ code parser, and in fact is quite simple | 56 `fructose_gen.py` is not a true C++ code parser, and in fact is quite simple |
57 in how it operates. This is sufficient for most cases, but please be aware of | 57 in how it operates. This is sufficient for most cases, but please be aware of |
58 the following limitations. | 58 the following limitations. |
59 | 59 |
60 1. Ensure your class (or struct) definition is all on one line: | 60 1. Ensure your class (or struct) definition is all on one line: |
61 | 61 |
62 class my_unit_test : public fructose::test_base<my_unit_test> | 62 class my_unit_test : public fructose::test_base<my_unit_test> |
63 | 63 |
64 If you split the above across multiple lines `fructose_gen.py` will not | 64 If you split the above across multiple lines `fructose_gen.py` will not |
65 recognize your class and will not generate a test instance for it. | 65 recognize your class and will not generate a test instance for it. |
66 | 66 |
67 2. `fructose_gen.py` does not understand C-style comments or the preprocessor. | 67 2. `fructose_gen.py` does not understand C-style comments or the preprocessor. |
68 To comment out a test, you can either use C++ comments, or change the function | 68 To comment out a test, you can either use C++ comments, or change the function |
69 name slightly to ensure it won't be recognized. Examples: | 69 name slightly to ensure it won't be recognized. Examples: |
70 | 70 |
71 /* | 71 /* |
72 ** void test_is_sorted(const std::string& name) // this won't work | 72 ** void test_is_sorted(const std::string& name) // this won't work |
73 */ | 73 */ |
74 | 74 |
78 | 78 |
79 void not_a_test_is_sorted(const std::string& name) // this works | 79 void not_a_test_is_sorted(const std::string& name) // this works |
80 // void test_is_sorted(const std::string& name) // this works | 80 // void test_is_sorted(const std::string& name) // this works |
81 // FRUCTOSE_TEST(is_sorted) // this works | 81 // FRUCTOSE_TEST(is_sorted) // this works |
82 | 82 |
83 The above also applies to commenting out test classes. | 83 The above also applies to commenting out test classes. |
84 | 84 |
85 | 85 |
86 Support | 86 Support |
87 ------- | 87 ------- |
88 See the [fructose_gen support site][2] hosted at [bitbucket.org][3]. | 88 See the [fructose_gen support site][2] hosted at [bitbucket.org][3]. |