<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.archlinux.jp/index.php?action=history&amp;feed=atom&amp;title=Faction</id>
	<title>Faction - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.archlinux.jp/index.php?action=history&amp;feed=atom&amp;title=Faction"/>
	<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Faction&amp;action=history"/>
	<updated>2026-05-10T12:36:32Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Faction&amp;diff=39005&amp;oldid=prev</id>
		<title>Kusanaginoturugi: /* 参照 */ add TranslationStatus.</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Faction&amp;diff=39005&amp;oldid=prev"/>
		<updated>2024-09-08T09:21:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;参照: &lt;/span&gt; add TranslationStatus.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年9月8日 (日) 18:21時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;99行目:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;99行目:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 参照 ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 参照 ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://timetoplatypus.com/static/faction/index.html Faction ホームページ]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://timetoplatypus.com/static/faction/index.html Faction ホームページ]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://github.com/timetoplatypus/three_b Faction サンプルプロジェクト]&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{TranslationStatus|Faction|2024/9/8|815766}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kusanaginoturugi</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Faction&amp;diff=12824&amp;oldid=prev</id>
		<title>Kusakata: ページの作成:「Category:フレームワーク en:Faction &#039;&#039;&#039;Faction&#039;&#039;&#039; はテスト駆動開発のための C ライブラリです。  == インストール ==  {{AUR|libfactio...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Faction&amp;diff=12824&amp;oldid=prev"/>
		<updated>2018-04-12T11:55:03Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&lt;a href=&quot;/index.php/%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA:%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF&quot; title=&quot;カテゴリ:フレームワーク&quot;&gt;Category:フレームワーク&lt;/a&gt; &lt;a href=&quot;https://wiki.archlinux.org/title/Faction&quot; class=&quot;extiw&quot; title=&quot;en:Faction&quot;&gt;en:Faction&lt;/a&gt; &amp;#039;&amp;#039;&amp;#039;Faction&amp;#039;&amp;#039;&amp;#039; はテスト駆動開発のための C ライブラリです。  == インストール ==  {{AUR|libfactio...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:フレームワーク]]&lt;br /&gt;
[[en:Faction]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Faction&amp;#039;&amp;#039;&amp;#039; はテスト駆動開発のための C ライブラリです。&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
&lt;br /&gt;
{{AUR|libfaction}} パッケージを[[インストール]]してください。&lt;br /&gt;
&lt;br /&gt;
== 使用方法 ==&lt;br /&gt;
ライブラリにはテストを素早く書くための C マクロが複数含まれています。&lt;br /&gt;
&lt;br /&gt;
* FI (Faction Initialization)&lt;br /&gt;
* FT (Faction Test)&lt;br /&gt;
* FC (Faction Close)&lt;br /&gt;
&lt;br /&gt;
FT マクロを使うときは3つのフィールドが必要です。&lt;br /&gt;
* AUTHORS() にはダブルクォーテーションで囲った作者の名前をカンマで区切ったリストで指定します。&lt;br /&gt;
* SPEC() にはシングルクォーテーションで囲ったテストの説明を記入します。&lt;br /&gt;
* C の boolean 表現 (C assert マクロと同じように使います)&lt;br /&gt;
&lt;br /&gt;
基本的にはテストするコードが含まれているソースファイルの末尾に Faction のテストを記述します。テストは FACTION マクロガードで囲ってください (下の例を参照)。そうすることでコンパイル時に有効化・無効化できます。GNU C Compiler (GCC) などの C コンパイラはコマンドラインでマクロを有効にすることができます ({{ic| -D}} フラグ)。&lt;br /&gt;
&lt;br /&gt;
== サンプル ==&lt;br /&gt;
&lt;br /&gt;
 /* This is the function to be tested */&lt;br /&gt;
 int&lt;br /&gt;
 increment(int input)&lt;br /&gt;
 {&lt;br /&gt;
    return (input + 1);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #ifdef FACTION&lt;br /&gt;
 #include &amp;lt;faction.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;limits.h&amp;gt;&lt;br /&gt;
 FI&lt;br /&gt;
 &lt;br /&gt;
   FT(&lt;br /&gt;
     AUTHORS( &amp;quot;timetoplatypus&amp;quot; ),&lt;br /&gt;
     SPEC( &amp;quot;increment() returns 1 when given 0&amp;quot; ),&lt;br /&gt;
     increment(0) == 1&lt;br /&gt;
   );&lt;br /&gt;
 &lt;br /&gt;
   FT(&lt;br /&gt;
     AUTHORS( &amp;quot;timetoplatypus&amp;quot; ),&lt;br /&gt;
     SPEC( &amp;quot;increment() returns 0 when given the largest integer value&amp;quot; ),&lt;br /&gt;
     increment(INT_MAX) == 0&lt;br /&gt;
   );&lt;br /&gt;
 &lt;br /&gt;
 FC&lt;br /&gt;
 #endif&lt;br /&gt;
&lt;br /&gt;
{{ ic | gcc &amp;lt;filename.c&amp;gt; -D FACTION }} でコンパイルすることができます。&lt;br /&gt;
&lt;br /&gt;
== モード ==&lt;br /&gt;
&lt;br /&gt;
Faction はコンパイルするときに2つのモードが存在します: &amp;#039;&amp;#039;minimal&amp;#039;&amp;#039; モードと &amp;#039;&amp;#039;extended&amp;#039;&amp;#039; モードです。&lt;br /&gt;
&lt;br /&gt;
上の例ではミニマルモードで Faction をコンパイルしています。ミニマルモードでは3つのライブラリに依存します: stdlib, stdio, getopt。拡張モードではさらに依存ライブラリが増え、一部の関数は GNU 機能検査マクロでしか使えません。&lt;br /&gt;
&lt;br /&gt;
拡張モードでコンパイルするときは、ファイルの一番上に GNU 機能検査マクロを定義してください。例えば、上記のサンプルは拡張モードでコンパイルすると以下のようになります:&lt;br /&gt;
{{ hc | head=&lt;br /&gt;
#ifdef FACTION&lt;br /&gt;
#define _GNU_SOURCE&lt;br /&gt;
#endif&lt;br /&gt;
| output=&lt;br /&gt;
/* This is the function to be tested */&lt;br /&gt;
increment(int input)&lt;br /&gt;
{&lt;br /&gt;
  return (input + 1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef FACTION&lt;br /&gt;
#include &amp;lt;faction.h&amp;gt;&lt;br /&gt;
#include &amp;lt;limits.h&amp;gt;&lt;br /&gt;
FI&lt;br /&gt;
&lt;br /&gt;
  FT(&lt;br /&gt;
    AUTHORS( &amp;quot;timetoplatypus&amp;quot; ),&lt;br /&gt;
    SPEC( &amp;quot;increment() returns 1 when given 0&amp;quot; ),&lt;br /&gt;
    increment(0) == 1&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
  FT(&lt;br /&gt;
    AUTHORS( &amp;quot;timetoplatypus&amp;quot; ),&lt;br /&gt;
    SPEC( &amp;quot;increment() returns 0 when given the largest integer value&amp;quot; ),&lt;br /&gt;
    increment(INT_MAX) == 0&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
FC&lt;br /&gt;
#endif&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== 拡張モードの機能 ===&lt;br /&gt;
&lt;br /&gt;
拡張モードでは:&lt;br /&gt;
* 実行時に {{ ic | -l }} フラグを使うことでユーザーが定義したログファイルに出力をコピーできます。&lt;br /&gt;
* 結果表は使用しているターミナルの横幅にあわせて動的にサイズが変わります。デフォルトの横幅は78文字です。&lt;br /&gt;
&lt;br /&gt;
== 参照 ==&lt;br /&gt;
* [https://timetoplatypus.com/static/faction/index.html Faction ホームページ]&lt;br /&gt;
* [https://github.com/timetoplatypus/three_b Faction サンプルプロジェクト]&lt;/div&gt;</summary>
		<author><name>Kusakata</name></author>
	</entry>
</feed>