• R/O
  • HTTP
  • SSH
  • HTTPS

ccunit: Commit

A C Unit Test Library for C language.


Commit MetaInfo

Revisión0140b47bac399709da9842d474825a2aca5b46fc (tree)
Tiempo2003-10-24 04:34:14
Autortsntsumi <tsntsumi@user...>
Commitertsntsumi

Log Message

add japanese documents

Cambiar Resumen

Diferencia incremental

--- a/doc/cookbook.dox
+++ b/doc/cookbook.dox
@@ -1,28 +1,70 @@
11 /* -*- Indented-Text -*- */
22 /* $Id$ */
3-/** @page cookbook CCUnit Cookbook
4-
3+/**
4+@english
5+@page cookbook CCUnit Cookbook
6+@endif
7+@japanese
8+@page cookbook CCUnit クックブック
9+@endif
10+
11+@~english
512 Here is a short cookbook to help you get started.
6-
13+@~japanese
14+これは CCUnit を使い始めるにあたって、
15+理解の助けとなるような短いクックブックです。
16+@~
17+@english
18+[see also <a href="../ja/cookbook.html">Japanese</a> documents]
19+@endif
20+@japanese
21+[see also <a href="../../cookbook.html">English</a> documents]
22+@endif
23+
24+@english
725 @section simple_test_case Simple Test Case
26+@endif
27+@japanese
28+@section simple_test_case シンプルなテストケース
29+@endif
830
31+@~english
932 Tests in <b>CCUnit</b> can be run automatically. They are
1033 easy to set up and once you have written them, they are
1134 always there to help you keep confidence in the quality of
1235 your code.
13-
36+@~japanese
37+CCUnitを使ったテストは自動的に実行することができます。
38+CCUnit のテストは簡単にセットアップすることができ、
39+一度テストを書いてしまえば、
40+いつでもプログラムの品質を信頼できるものに保つことができるでしょう。
41+@~
42+
43+@~english
1444 To make a simple test, here is what you do:
45+@~japanese
46+単純なテストを作るには、次のようにします。
47+@~
1548
1649 <ol>
17-<li> Create a test function</li>
18-<li> When you want to check a value, call
50+<li> @~english Create a test function
51+ @~japanese テスト関数を作る</li>
52+<li> @~english When you want to check a value, call
53+ @~japanese 値をチェックしたい場合は、@~
1954 @link CCUNIT_ASSERT() CCUNIT_ASSERT(bool) @endlink
20- and pass a bool that is true if the test succeeds</li>
55+ @~english and pass a bool that is true if the test succeeds
56+ @~japanese を呼び出して、
57+ もしテストが成功するのであれば真を返すような真偽値を渡します</li>
2158 </ol>
2259
60+@~english
2361 For example, to test that the sum of two complex number
2462 which is the sum of the values of two complex numbers,
2563 write:
64+@~japanese
65+例えば、二つの複素数の合計が、
66+二つの複素数の値を加算した値と同じであることをテストするとします。
67+@~
2668
2769 @code
2870 void test_complex_add ()
@@ -35,40 +77,111 @@ void test_complex_add ()
3577 }
3678 @endcode
3779
80+@~english
3881 That was a very simple test. Ordinarily, you'll have many
3982 little test cases that you'll want to run on the same set of
4083 objects. To do this, use a fixture.
41-
84+@~japanese
85+これは大変単純なテストです。
86+通常、同じデータのセットで走らせるために、
87+たくさんの小さなテストケースを作らなければならないでしょう。
88+そうするにはフィクスチャ(備品)を使います。
89+@~
90+
91+@english
4292 @section fixture Fixture
93+@endif
94+@japanese
95+@section fixture フィクスチャ
96+@endif
4397
98+@~english
4499 What if you have two or more tests that operate on the same
45100 similar set of objects?
101+@~japanese
102+もし二つ以上のテストがあるなら、
103+同じ類似のデータのセットで操作するのではないでしょうか。
104+@~
46105
106+@~english
47107 Tests need to run against the background of a known set of
48108 objects. This set of objects is called a test fixture. When
49109 you are writing tests you will often find that you spend
50110 more time writing the code to set up the fixture than you do
51111 in actually testing values.
52-
53-Often, you will be able to use the same fixture for sevral
112+@~japanese
113+テストは周知のデータのセットを背景にして実行される必要があります。
114+このデータのセットをフィクスチャと呼ぶことにします。
115+テストを書いていると、
116+実際のテストする値をフィクスチャにセットアップするコードを書く方に、
117+もっと時間をかけていることに気づくことがよくあります。
118+@~
119+
120+@~english
121+Often, you will be able to use the same fixture for several
54122 different tests. Each case will send slightly different
55-messages or parameteres to the fixture and will check for
123+messages or parameters to the fixture and will check for
56124 different results.
57-
125+@~japanese
126+多くの場合、いくつかの異なったテストのために同じフィクスチャを使うことができます。
127+それぞれのテストケースは少し異なったメッセージ、
128+あるいはパラメータをフィクスチャに送り、
129+異なる結果を調べます。
130+@~
131+
132+@~english
58133 When you have a common fixture, here is what you do:
134+@~japanese
135+もし共通するフィクスチャがあれば、こんなふうにすることになり
136+ます。
137+@~
59138
60139 <ol>
61-<li>Create a @link CCUnitTestCase TestCase @endlink object</li>
62-<li>Add an global variable for each part of the fixture</li>
63-<li>Write <code>setUp()</code> function to initialize the valiables</li>
64-<li>Write <code>tearDown()</code> to release any permanent
65- resources you allocated in <code>setUp</code></li>
66-<li>Create a @link CCUnitTestFixture TestFixture @endlink object</li>
67-<li>Add test case objects to fixture object</li>
140+<li>@~english
141+ Create a @link CCUnitTestCase TestCase @endlink object
142+ @~japanese
143+ @link CCUnitTestCase TestCase @endlink 構造体にメモリを割り当てます
144+ (以降、構造体に割り当てたメモリを、オブジェクトと呼ぶことにします)
145+</li>
146+<li>@~english
147+ Add an global variable for each part of the fixture
148+ @~japanese
149+ フィクスチャのそれぞれの部分に大域変数を追加します
150+</li>
151+<li>@~english
152+ Write <code>setUp()</code> function to initialize the valiables
153+ @~japanese
154+ <code>setUp()</code> 関数を書いて変数を初期化します
155+</li>
156+<li>@~english
157+ Write <code>tearDown()</code> to release any permanent
158+ resources you allocated in <code>setUp</code>
159+ @~japanese
160+ <code>tearDown()</code> 関数を書いて<code>setUp</code>
161+ で割り当てた永続的リソースを解放します
162+</li>
163+<li>@~english
164+ Create a @link CCUnitTestFixture TestFixture @endlink object
165+ @~japanese
166+ @link CCUnitTestFixture CCUnitTestFixture @endlink
167+ 構造体にメモリを割り当てます
168+</li>
169+<li>@~english
170+ Add @link GGUnitTestCase TestCase @endlink objects to fixture object
171+ @~japanese
172+ @link CCUnitTestCase TestCase @endlink
173+ オブジェクトを@link CCUnitTestFixture TestFixture @endlink
174+ フィクスチャオブジェクトに登録します。
175+</li>
68176 </ol>
69177
178+@~english
70179 For example, to write several test cases, first create a
71180 fixture:
181+@~japanese
182+例えば、いくつかのテストケースを書く場合、
183+最初にフィクスチャを作成します。
184+@~
72185
73186 @code
74187 //** TEST CASE: complex number test *\/
@@ -85,7 +198,7 @@ void setUp_ComplexTest ()
85198 s1_1 = complex_new (1, 1);
86199 s11_2 = complex_new (11, 2);
87200 }
88-
201+
89202 void tearDown_ComplexTest ()
90203 {
91204 complex_delete (s10_1);
@@ -101,16 +214,36 @@ void tearDown_ComplexTest ()
101214 CCUNIT_NEWTESTFUNC(tearDown_ComplexTest));
102215 @endcode
103216
217+@~english
104218 Once you have the Fixture in place, you can write as complex
105219 Test Cases as you'd like.
220+@~japanese
221+一度決まったところにフィクスチャを書いてしまえば、
222+あなたが好きなように複素数のテストケースを書くことができます。
223+@~
106224
225+@english
107226 @section test_case Test Case
227+@endif
228+@japanese
229+@section test_case テストケース
230+@endif
108231
232+@~english
109233 How do you write and invoke an individual test case when you
110234 have a Fixture?
235+@~japanese
236+フィクスチャを一つ書いたとして、
237+どうやって個々のテストケースを書いて実行すれば良いでしょうか。
238+@~
111239
240+@~english
112241 For example, to test the equality of two complex number,
113242 write:
243+@~japanese
244+例えば、二つの複素数が等しい(または等しくない)ことをテストするには、
245+次のように書きます。
246+@~
114247
115248 @code
116249 void test_complex_equals ()
@@ -121,48 +254,89 @@ void test_complex_equals ()
121254
122255 ...
123256
124- ccunit_addNewTestCase (fixture,
257+ ccunit_addNewTestCase (fixture,
125258 "test_complex_equals",
126259 "complex equals test",
127260 test_complex_equals);
128- ccunit_addNewTestCase (fixture,
129- "test_complex_add",
130- "complex add test",
131- test_complex_add);
132-@endcode
261+@endcode
133262
263+@~english
134264 One may create and run objects for each test case like this:
265+@~japanese
266+一つには次のように、
267+フィクスチャを作成してそれぞれのテストケースを実行させること
268+ができます。
269+@~
135270
136271 @code
137272 CCUnitTestResult* result;
138273 result = ccunit_runTestFixture (fixture);
139274 @endcode
140275
276+@~english
141277 When the test fixture is run, that specific test functions
142278 will be run. This is not a useful thing to do, however, as
143279 no diagnostics will be displayed. One will normally use a
144280 @link ExecutingTest TestRunner @endlink (see below) to
145281 display the results.
146-
282+@~japanese
283+テストフィクスチャが実行されると、
284+特定のテスト関数が呼び出されます。
285+これはあまり便利ではありません、
286+なぜなら、診断が表示されないからです。
287+通常は @link ExecutingTest TestRunner @endlink
288+(@ref test_runner 後述)
289+で結果を表示します。
290+@~
291+
292+@~english
147293 Once you have several tests, organize them into a suite.
294+@~japanese
295+一度いくつかのテストを作ったら、
296+それらをスイートに整理します。
297+@~
148298
299+@english
149300 @section suite Suite
301+@endif
302+@japanese
303+@section suite スイート
304+@endif
150305
306+@~english
151307 How do you set up your tests so that you can run them all at once?
308+@~japanese
309+どのようにして、一度にテストを実行することができるよう、
310+準備したらいいでしょうか?
311+@~
152312
313+@~english
153314 %CCUnit provides a @link CCUnitTestSuite TestSuite @endlink
154315 module that runs any number of TestCases together.
316+@~japanese
317+CCUnit はいくつもの @link CCUnitTestCase TestCases @endlink
318+を一緒に実行する
319+@link CCUnitTestSuite TestSuite @endlink モジュールを提供します。
320+@~
155321
322+@~english
156323 You saw, above, how to run test fixture.
324+@~japanese
325+テストフィクスチャを実行する方法は上述しました。
326+@~
157327
328+@~english
158329 To create a suite of two or more tests, you do the following:
330+@~japanese
331+二つ以上のテストを含む一つのスイートを作るには、次のようにします。
332+@~
159333
160334 @code
161335 CCUnitTestSuite* suite;
162336 CCUnitTestFixture* fixture;
163337 CCUnitTestResult* result;
164338 suite = ccunit_newTestSuite ("Complex test suite");
165-fixture = ccunit_newTestFixture ("Complex Tests",
339+fixture = ccunit_newTestFixture ("Complex Tests",
166340 CCUNIT_NEWTESTFUNC(setUp_complex_test),
167341 CCUNIT_NEWTESTFUNC(tearDown_complex_test));
168342 ccunit_addNewTestCase (fixture, "test_complex_equals", "complex equals test",
@@ -173,8 +347,9 @@ ccunit_addNewTestCase (fixture, "test_complex_sub", "complex sub test",
173347 test_complex_sub);
174348 ccunit_addTestFixture (suite, fixtuer);
175349 result = ccunit_runTestSuite (suite, NULL);
176-@endcode
350+@endcode
177351
352+@~english
178353 @link CCUnitTestSuite TestSuites @endlink don't only have to
179354 contain @link CCUnitTestFixture TestFixtures @endlink. They
180355 can contain any object that implements the @link CCUnitTest
@@ -183,6 +358,17 @@ Test @endlink interface. For example, you can create a
183358 can create one in mine, and we can run them together by
184359 creating a @link CCUnitTestSuite TestSuite @endlink that
185360 contains both:
361+@~japanese
362+@link CCUnitTestSuite TestSuites @endlink は
363+@link CCUnitTestFixture TestFixtures @endlink
364+を含むだけではありません。
365+それらは @link CCUnitTest Test @endlink
366+インタフェースを実装するどんなオブジェクトでも含められます。
367+例えば、あなたはあなたのコードに@link CCUnitTestSuite TestSuite @endlink
368+を作ることができ、そして私は私のスイートを作ることができます、
369+そして私達は両方ともを含んでいる @link CCUnitTestSuite TestSuite @endlink
370+を作って一緒に個々のスイートを動かすことができるのです。
371+@~
186372
187373 @code
188374 CCUnitTestSuite* suite;
@@ -194,37 +380,74 @@ result = ccunit_runTestSuite(suite, NULL);
194380 @endcode
195381
196382
383+@english
197384 @section test_runner TestRunner
385+@endif
386+@japanese
387+@section test_runner テストランナー
388+@endif
198389
390+@~english
199391 How do you run your tests and collect their results?
392+@~japanese
393+どうやってテストを実行し、その結果を集めたら良いでしょうか。
394+@~
200395
396+@~english
201397 Once you have a test suite, you'll want to run it. %CCUnit
202398 provides tools to define the suite to be run and to display
203399 its results. You make your suite accessible to a @link
204400 CreatingTestSuite ccunit_makeSuite @endlink tool that generate a
205401 creating test suite code.
206-
207-For example, to make a ComplexTest suite available to a
208-@link CreatingTestSuite ccunit_makeSuite @endlink,
209-excute the following tool to
402+@~japanese
403+一つテストスイートを書いたら、
404+それを実行したいでしょう。
405+CCUnit はスイートを実行するために定義し、
406+結果を表示するためのツールを提供します。
407+スーツを@link CreatingTestSuite ccunit_makeSuite @endlink
408+ツールに入力できるような形式で書くことで、
409+テストスーツを作成するコードを自動的に生成することができます。
410+@~
411+
412+@~english
413+For example, to make a ComplexTest suite available to a
414+@link CreatingTestSuite ccunit_makeSuite @endlink,
415+excute the following tool to
210416 ComplexTest.c:
417+@~japanese
418+例えば、ComplexTest スイートを
419+@link CreatingTestSuite ccunit_makeSuite @endlink
420+を使って使用できるようにするには、
421+以下のツールを ComplexTest.c に実行します。
422+@~
211423
212424 @code
213425 $ ccunit_makeSuite -f complex_suite -o suiteComplex.c ComplexTest.c
214426 @endcode
215427
216428 @anchor test_runner_code
429+@~english
217430 To use the TestRunner, include the header files for the tests in Main.c:
431+@~japanese
432+TestRunner を使用するには、
433+Main.cでテストのためのファイルのヘッダをインクルードします。
434+@~
218435
219436 @code
220437 #include <ccunit/CCUnitTestRunner.h>
221438 #include <ccunit/CCUnitTestSuite.h>
222439 @endcode
223440
441+@~english
224442 And call to
225443 @link ccunit_runTestRunner()
226-ccunit_runTestRunner (CCUnitTestRunner*, CCUnitTestSuite *) @endlink
444+ccunit_runTestRunner (CCUnitTestRunner*, CCUnitTestSuite *) @endlink
227445 in the <code>main()</code> function:
446+@~japanese
447+そして@link ccunit_runTestRunner()
448+ccunit_runTestRunner (CCUnitTestRunner*, CCUnitTestSuite *) @endlink
449+を<code>main()</code>関数で実行します。
450+@~
228451
229452 @code
230453 extern CCUnitTestSuite* complex_suite(const char* name);
@@ -239,45 +462,106 @@ int main( int argc, char **argv)
239462 }
240463 @endcode
241464
242-The @link ExecutingTest TestRunner @endlink will run the tests.
243-If all the tests pass, you'll get an informative message.
465+@~english
466+The @link ExecutingTest TestRunner @endlink will run the tests.
467+If all the tests pass, you'll get an informative message.
244468 If any fail, you'll get the following information:
469+@~japanese
470+@link ExecutingTest TestRunner @endlink はテストを実行します。
471+もしすべてのテストがパスすれば、その情報のメッセージが表示されます。
472+もしどれかが失敗すれば、それについて以下のような情報が表示されます。
473+@~
245474
246475 <ul>
247-<li> The name of the source file that contains the test</li>
248-<li> The line number where the failure occurred</li>
249-<li> The name of the test case that failed</li>
250-<li> All of the text inside the call to
251- <code>CCUNIT_ASSERT ()</code> which detected the failure</li>
476+<li>@~english
477+ The name of the source file that contains the test
478+ @~japanese
479+ テストを含んでいるソースファイル名
480+</li>
481+<li>@~english
482+ The line number where the failure occurred
483+ @~japanese
484+ 失敗が怒った行番号
485+</li>
486+<li>@~english
487+ The name of the test case that failed
488+ @~japanese
489+ 失敗したテストケースの名前
490+</li>
491+<li>@~english
492+ All of the text inside the call to
493+ <code>CCUNIT_ASSERT ()</code> which detected the failure
494+ @~japanese
495+ 失敗を検知した<code>CCUNIT_ASSERT ()</code>が呼び出された時の条件の文字列。
496+</li>
252497 </ul>
253498
499+@english
254500 @section helper_macros Helper Tool
255-
256-As you might have noticed, implementing the fixture
257-<code>suite ()</code> function is a repetitive and error
501+@endif
502+@japanese
503+@section helper_macros ヘルパーツール
504+@endif
505+
506+@~english
507+As you might have noticed, implementing the <code>suite
508+()</code> function of fixture is a repetitive and error
258509 prone task. A @ref CreatingTestSuite set of functions and
259510 command have been created to automatically implements the
260-<code>suite()</code> method.
511+<code>suite()</code> function.
512+@~japanese
513+お気づきのように、フィクスチャの <code>suite ()</code>関数を実装するのは、
514+反復的で間違いやすい作業です。
515+@ref CreatingTestSuite の関数のセットとコマンドは<code>suite ()</code>
516+関数の実装を自動的に作成することができます。
517+@~
518+
519+@dontinclude complex/testComplex.c
261520
521+@~english
262522 The following code is a rewrite of ComplexTest using those command:
523+@~japanese
524+以下のコードはそれらのコマンドが使うようにComplexTestを書換えたものです。
525+@~
263526
264527 @code
265528 #include <cppunit/CCUnitAssert.h>
266529 @endcode
267530
531+@~english
268532 First, you declare the fixture, passing the test fixture
269533 name to the javaDoc style comment, which consist of a
270534 C-style comment block starting with two <tt>*</tt>'s:
535+@~japanese
536+最初に、フィクスチャを宣言します。
537+これはjavaDocスタイルのコメント内にフィクスチャの名前を記述します。
538+javaDocスタイルのコメントとは C スタイルのコメントブロックの開始が
539+二つのアスタリスク<tt>*</tt>になっているものです。
540+@~
271541
272542 @code
273543 //** test case: complex number test *\/
274544 @endcode
275545
276-The suite created by the <code>ccunit_suite()</code>
277-function is specified <code>-f</code> option of command
278-<code>ccunit_makeSuite</code>. Then, you define each test
279-case of the fixture with prefix <code>test</code>,
280-<code>setUp</code>, <code>tearDown</code>:
546+@~english
547+The function to make @link CCUnitTestSuite TestSuite
548+@endlink is <code>ccunit_suite</code>.
549+But, it can be changed to another
550+name by the <code>-f</code> option of the
551+<code>ccunit_makeSuite</code> command, too.
552+Then, you define each test case of the fixture with prefix
553+<code>test</code>, <code>setUp</code>,
554+<code>tearDown</code>:
555+
556+@~japanese
557+@link CCUnitTestSuite TestSuite @endlink
558+を作成する関数は <code>ccunit_suite</code> です、
559+しかし <code>ccunit_makeSuite</code> コマンドの
560+<code>-f</code> オプションで別の名前に変えることもできます。
561+そして、フィクスチャのテストケースにはそれぞれ名前の先頭に、
562+<code>test</code>, <code>setUp</code>,
563+<code>tearDown</code> をつけてください。
564+@~
281565
282566 @code
283567 #include <complex.h>
@@ -292,7 +576,7 @@ void setUp_complex_test ()
292576 s1_1 = complex_new (1, 1);
293577 s11_2 = complex_new (11, 2);
294578 }
295-
579+
296580 void tearDown_complex_test ()
297581 {
298582 complex_delete (s10_1);
@@ -328,17 +612,27 @@ void test_complex_sub ()
328612 }
329613 @endcode
330614
615+@~english
331616 Finally, you end the fixture declaration:
617+@~japanese
618+最後に、フィクスチャの終りを宣言します。
619+@~
332620
333621 @code
334622 //** end test case *\/
335623 @endcode
336624
625+@~english
337626 To generate creating suite function code, run
338627 <code>ccunit_makeSuite</code> tool.
628+@~japanese
629+スイート作成関数のコードを生成するには、
630+<code>ccunit_makeSuite</code>ツールを実行します。
631+@~
339632
340633 @code
341-$ ccunit_makeSuite testComplex.c
634+$ ccunit_makeSuite -f complex_suite -o suiteComplex.c testComplex.c
635+$ cat suiteComplex.c
342636
343637 #include <ccunit/CCUnitTestSuite.h>
344638 #include <ccunit/CCUnitTestFixture.h>
@@ -356,6 +650,26 @@ extern void test_complex_add ();
356650 //* test_complex_sub *\/
357651 extern void test_complex_sub ();
358652
653+static CCUnitTestFunc fx_001_cases[] = {
654+ {
655+ "test_complex_equals",
656+ "test equals",
657+ test_complex_equals
658+ },
659+ {
660+ "test_complex_add",
661+ "test add",
662+ test_complex_add
663+ },
664+ {
665+ "test_complex_sub",
666+ "test sub",
667+ test_complex_sub
668+ },
669+ {
670+ NULL, NULL, NULL
671+ },
672+};
359673
360674 static CCUnitTestFixtureDfn fx_001 = {
361675 { ccunitTypeFixture },
@@ -370,38 +684,22 @@ static CCUnitTestFixtureDfn fx_001 = {
370684 "tearDown_complex_test",
371685 tearDown_complex_test
372686 },
373- {
374- {
375- "test_complex_equals",
376- "test equals",
377- test_complex_equals
378- },
379- {
380- "test_complex_add",
381- "test add",
382- test_complex_add
383- },
384- {
385- "test_complex_sub",
386- "test sub",
387- test_complex_sub
388- },
389- {
390- NULL, NULL, NULL
391- },
392- }
687+ fx_001_cases,
688+};
689+
690+static CCUnitTestDfn* suite_001_test[] = {
691+ &fx_001.test,
692+ NULL,
393693 };
394694
395695 static CCUnitTestSuiteDfn suite_001 = {
396696 { ccunitTypeSuite },
397697 "",
398- {
399- &suite_002.test,
400- NULL,
401- },
698+ suite_001_test
402699 };
403700
404-CCUnitTestSuite* ccunit_suite (const char* name)
701+
702+CCUnitTestSuite* complex_suite (const char* name)
405703 {
406704 if (!suite_001.name[0])
407705 suite_001.name = name;
@@ -410,18 +708,44 @@ CCUnitTestSuite* ccunit_suite (const char* name)
410708 $
411709 @endcode
412710
711+@english
413712 @section post_build_check Post-build check
713+@endif
714+@japanese
715+@section post_build_check ビルド後のチェック
716+@endif
414717
718+@~english
415719 Now that we have our unit tests running, how about
416720 integrating unit testing to our build process ?
721+@~japanese
722+さあユニットテストを実行する準備ができました。
723+ではビルドプロセスにユニットテストを統合するにはどうしたらい
724+いでしょう。
725+@~
417726
727+@~english
418728 To do that, the application must returns a value different than 0 to indicate that
419729 there was an error.
730+@~japanese
731+そうするには、アプリケーションは、エラーが発生したことを示す
732+0以外の値を返さなければなりません。
733+@~
420734
421-@link ccunit_runTestRunner() ccunit_runTestRunner() @endlink returns
735+@~english
736+@link ccunit_runTestRunner() ccunit_runTestRunner() @endlink returns
422737 a integer indicating if the run was successful.
738+@~japanese
739+@link ccunit_runTestRunner() ccunit_runTestRunner() @endlink
740+は、実行が成功したかどうかを示す整数を返します。
741+@~
423742
743+@~english
424744 Updating our main programm, we obtains:
745+@~japanese
746+次のようにメインプログラムを更新します。
747+@~
748+
425749 @code
426750 #include <ccunit/CCUnitTestRunner.h>
427751
@@ -437,6 +761,14 @@ int main (int argc, char** argv)
437761 }
438762 @endcode
439763
764+@~english
440765 Now, you need to run your application after compilation.
766+The sample program made in the above is in the example/complex directory.
767+@~japanese
768+それではアプリケーションをコンパイルした後に実行してみましょ
769+う。
770+以上で作成したサンプルプログラムは example/complex ディレク
771+トリにあります。
772+@~
441773
442774 */
--- a/doc/mainpage.dox
+++ b/doc/mainpage.dox
@@ -2,44 +2,111 @@
22 /* $Id$ */
33 /** @mainpage
44
5+@~english
56 CCUnit is a simple framework to write repeatable tests with C language.
6-
7+@~japanese
8+CCUnit は C 言語で繰り返し可能なテストを書くための簡単なフレ
9+ームワークです。
10+@~
11+@english
12+[see also <a href="../ja/index.html">Japanese</a> documents]
13+@endif
14+@japanese
15+[see also <a href="../../index.html">English</a> documents]
16+@endif
17+
18+@english
719 @section _installation Installation
20+@endif
21+@japanese
22+@section _installation インストール
23+@endif
824
25+@~english
926 Below are the installation steps for installing CCUnit:
27+@~japanese
28+以下に CCUnitをインストールする手順を示します。
1029
30+@if English
1131 <ol>
1232 <li>expand the archive file.</li>
13-<li>cd to expanded dir.</li>
14-<li>run the `<code>./configure</code>' file.</li>
33+<li>cd to expanded dir. </li>
34+<li>run the `<code>./configure</code>' file. </li>
1535 <li>type <code>make</code> to create ccunit library. </li>
1636 <li>type <code>make install</code> to install.</li>
1737 </ol>
38+@endif
39+
40+@japanese
41+<ol>
42+<li>アーカイブファイルを展開します。</li>
43+<li>展開したディレクトリにcdします。</li>
44+<li>`<code>./configure</code>' ファイルを実行します。</li>
45+<li><code>make</code> とタイプして ccunit ライブラリを作成します。</li>
46+<li><code>make install</code> としてインストールします。</li>
47+</ol>
48+@endif
1849
50+@english
1951 @section _usage Getting Started
52+@endif
53+@japanese
54+@section _usage さあ始めましょう
55+@endif
2056
57+@~english
2158 <a href="modules.html">Modules</a> give
2259 you a organized view of %CCUnit modules.
60+@~japanese
61+<a href="modules.html">モジュール</a>
62+セクションは CCUnit のモジュールを整理して表示しています。
2363
24-<!--
64+@~english
2565 You find additional samples in the examples directory.
66+@~japanese
67+examples ディレクトリにはサンプルファイルがあります。
2668
27-- SimpleTest.c - some simple test cases
28-- ArrayTest.c - test case for array.
29--->
69+@~english
70+- ComplexTest.c - some complex number library test cases
71+@~japanese
72+- ComplexTest.c - 複素数ライブラリのいき塚のテストケースです
73+@~
3074
75+@english
3176 @section _documentation Documentation
77+@endif
78+@japanese
79+@section _documentation ドキュメント
80+@endif
3281
3382 <dl>
3483 <dt>CCUnit Cookbook</dt>
35-<dd>A <a href="cookbook.html">cookbook</a> for implementing tests with CCUnit.
84+<dd>@~english
85+ A <a href="cookbook.html">cookbook</a> for implementing
86+ tests with CCUnit. (and <a
87+ href="../ja/cookbook.html">cookbook in
88+ japanese</a>)
89+ @~japanese
90+ CCUnitでテストを実装するための<a href="cookbook.html">クックブック</a>
91+ (see also <a
92+ href="../../cookbook.html">Cookbook in
93+ English</a> Edition)
3694 </dl>
3795
96+@english
3897 @section _license Lincense
98+@endif
99+@japanese
100+@section _license ライセンス
101+@endif
39102
103+@~english
40104 This library is released under the GNU
41105 <a href="http://www.gnu.org/copyleft/lesser.html"
42106 >Lesser General Public License</a>.
107+@~japanese
108+このライブラリは、GNU <a href="http://www.gnu.org/copyleft/lesser.html"
109+>Lesser General Public License</a> の元で配布しています。
43110
44111 */
45112
Show on old repository browser