-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
256 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?xml version="1.0" encoding="Shift_JIS"?> | ||
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | ||
<head> | ||
<title>iutest - Wandbox</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" /> | ||
<meta http-equiv="content-style-type" content="text/css" /> | ||
<style type="text/css"> | ||
body { | ||
font-family: Arial,'MS Pゴシック',sans-serif ; | ||
background-color:#008080; | ||
line-height:130%; | ||
} | ||
h1 { | ||
padding:20px 10px; | ||
background-color:#cccccc; | ||
border-bottom: solid 1px #808080; | ||
} | ||
h2 { | ||
padding:14px 10px; | ||
background-color:#cccccc; | ||
border-bottom: solid 1px #808080; | ||
} | ||
h3 { | ||
padding:10px 10px; | ||
background-color:#cccccc; | ||
border-bottom: solid 1px #808080; | ||
} | ||
.contents { | ||
padding:0px 0px 1em 0px; | ||
background-color:#f8f8f8; | ||
border-right: solid 5px #006400; | ||
border-bottom: solid 10px #006400; | ||
} | ||
li { | ||
padding-bottom:4px; | ||
} | ||
.text_block { | ||
padding-left:1em; | ||
} | ||
.source { | ||
border : solid 2px #006400; | ||
background-color:#ffffff; | ||
padding: 0.5em; | ||
margin: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="contents"> | ||
<h1>Wandbox の利用</h1> | ||
|
||
<div class="contents"> | ||
<h2>iuwandbox</h2> | ||
<div class="text_block"> | ||
<a href="">Wandbox</a> で iutest を使ったテストコードを書けるように対応しました。<br /> | ||
様々なコンパイラー・バージョンでビルド・テストができるため、あなたのプログラムのコンパイラー対応を助けます。<br /> | ||
</div> | ||
</div> <!-- end of contents --> | ||
|
||
<div class="contents"> | ||
<h2>使い方</h2> | ||
<div class="text_block"> | ||
tools/wandbox/iuwandbox.py を使用します。<br /> | ||
iuwandbox は python で書かれていますので、python が利用可能な環境で実行してください。<br /> | ||
実行は簡単です。ビルド・実行したいソースコードファイルを引数に渡すだけです。<br /> | ||
<br /> | ||
|
||
例)<br /> | ||
<pre> | ||
iuwandbox.py sample.cpp | ||
</pre> | ||
|
||
ソースコードに特別な記述は必要ありません。<br /> | ||
重要なのは iutest.hpp を include することです。このとき、iutest.hpp にパスが通っていなくても問題ありません。<br /> | ||
<pre class="source"> | ||
#include "../../include/iutest.hpp" | ||
#include <iostream> | ||
|
||
int main(int argc, char** argv) | ||
{ | ||
int x = 0; | ||
std::cout << "hoge" << std::endl; | ||
|
||
IUTEST_INIT(&argc, argv); | ||
return IUTEST_RUN_ALL_TESTS(); | ||
} | ||
|
||
IUTEST(Foo, Bar) | ||
{ | ||
IUTEST_ASSERT_EQ(1, abs(-1)); | ||
} | ||
</pre> | ||
|
||
サンプルの実行結果はこちらになります。<br /> | ||
<br /> | ||
コンパイラーの選択などは後述のコマンドラインオプションの項をご覧ください。<br /> | ||
</div> | ||
|
||
<h2>コマンドラインオプション</h2> | ||
<div class="text_block"> | ||
<table class="ruled" > | ||
<tr><td>-c,--compiler COMPILER</td> <td>コンパイラーを選択します。選択できるコンパイラーは Wandbox を確認するか、--list_compiler オプションで確認してください。</td></tr> | ||
<tr><td>-x,--options OPTIONS</td> <td>オプションを選択します。選択できるコンパイラーは Wandbox を確認するか、--list_options オプションで確認してください。</td></tr> | ||
<tr><td>-f,--compiler_options_raw OPTIONS</td><td>コンパイラーのオプションを直接指定します。複数のオプションを指定する場合は、[ -f"-Dx=hogefuga\n-O3" ] とするか、[ -f"-Dx=hogefuga" -f"-O3" ] のように複数オプションを記述してください。 </td></tr> | ||
<tr><td>-r,--runtime_options_raw OPTIONS</td><td>ビルドした実行ファイルのコマンドラインオプションを指定します。複数のオプションを指定する場合は、[ -r"--iutest_shuffle\n--iutest_random_seed=1" ] とするか、[ -r"--iutest_shuffle" -r"--iutest_random_seed=1" ] のように複数オプションを記述してください。 </td></tr> | ||
<tr><td>--list_compiler</td><td>利用可能なコンパイラーを列挙します。</td></tr> | ||
<tr><td>--list_options COMPILER</td><td>COMPILER で利用可能なオプションを列挙します。</td></tr> | ||
<tr><td>--stdin</td> <td>実行時の stdin の内容を指定します。</td></tr> | ||
<tr><td>--encoding ENCODING</td><td>入力ソースコードファイルのエンコードを指定します。</td></tr> | ||
<tr><td>-s, --save</td> <td>permarnent link を生成します。</td></tr> | ||
<tr><td>--permlink ID</td> <td>ID の permarnent link の情報を取得します。--output オプションを指定すると、ソースコードをファイルに書き出します。</td></tr> | ||
<tr><td>-o, --output FILE</td><td>--permlink 指定した際に取得したソースコードを FILE に書き出します。</td></tr> | ||
<tr><td>-v,--version</td> <td>バージョンを表示します</td></tr> | ||
<tr><td width="200px">-h,--help</td> <td>ヘルプを表示します</td></tr> | ||
</table> | ||
</div> | ||
|
||
</div> <!-- end of contents --> | ||
|
||
<br /> | ||
<div align="right">Copyright (c) 2011-2014, Takazumi-Shirayanagi, All rights reserved.</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.