はじめに
これらクラスは、printf(format)、scanf(input)に代わる組み込み向け C++ コードで、ヘッダーをインクルードするだけで、他の環境でも利用可能となっている。
※自分は、clang64 などの環境でも便利に利用している。
- C++17 コンパイラが必須
- 元々、printf、scanf などの可変引数の安全性に疑問があり、それを避ける為に実装を始めたもの
- C++ 環境なので、C 言語の関数を利用するメリットがない
- C++ には、安全性を意識した実装が色々あるが、「組み込み」マイコンで使うには、巨大になる為、使えない場合が多々ある
- 「巨大」になる理由として、std::iostream クラスの存在がある
- 組み込みマイコン環境で使っても、意外とコンパクトになるし、ヘッダーをインクルードするだけで使えて便利!
- 実装は、あまり巨大ではなく、適当に難解で、C++ のスキルを磨くのにも重宝している
- 仕様的にイマイチな部分もあるけど、現状、それなりに歴史があるので、大きな仕様変更を行う事が出来ない
- テスト環境も充実してきており、問題無く利用可能となっている
- 以前は、「%g」の仕様が満足に実装されていなかったが、それも実装され、ほぼ困る事が無くなった
- 浮動小数点のパースでは、主に整数計算を利用しており、FPU を持たない CPU でもリソースを多く消費しない
- 64 ビット浮動小数点のパースは基本出来ない(floatにキャストする)のだが、困る事はすくない
- 64 ビット浮動小数点をサポートしない為、コンパクトになる
- int64_t、uint64_t などの 64 ビット整数は扱えるように改修した
- 「if constexpr」を使う事で、コードをシンプル、ダイエットする事が出来た(C++17)
- github ディレクトリには、全体テストを行うソースが含まれている
- format クラスでは、printf の出力と比較される
- input クラスでは、入力された文字列と、実際の数値などが比較される
- 使い方など詳しくは、github のリンクを参照して下さい
format クラス
Github format class で公開しているコードを更新した。
( 1) ( 1/ 1) output buffer size check. Pass.
( 2) ( 1/10) decimal check. Ref: 'form=12345678' <-> Res: 'form=12345678' Pass.
( 2) ( 2/10) decimal check. Ref: 'form=-12345678' <-> Res: 'form=-12345678' Pass.
( 2) ( 3/10) decimal check. Ref: 'form= 12345678' <-> Res: 'form= 12345678' Pass.
( 2) ( 4/10) decimal check. Ref: 'form= -12345678' <-> Res: 'form= -12345678' Pass.
( 2) ( 5/10) decimal check. Ref: 'form=000012345678' <-> Res: 'form=000012345678' Pass.
( 2) ( 6/10) decimal check. Ref: 'form=-00012345678' <-> Res: 'form=-00012345678' Pass.
( 2) ( 7/10) decimal check. Ref: 'form=12345678' <-> Res: 'form=12345678' Pass.
( 2) ( 8/10) decimal check. Ref: 'form=-12345678' <-> Res: 'form=-12345678' Pass.
( 2) ( 9/10) decimal check. Ref: 'form=12345678' <-> Res: 'form=12345678' Pass.
( 2) (10/10) decimal check. Ref: 'form=-12345678' <-> Res: 'form=-12345678' Pass.
( 3) ( 1/ 5) octal check. Ref: 'form=1245667' <-> Res: 'form=1245667' Pass.
( 3) ( 2/ 5) octal check. Ref: 'form= 1245667' <-> Res: 'form= 1245667' Pass.
( 3) ( 3/ 5) octal check. Ref: 'form=001245667' <-> Res: 'form=001245667' Pass.
( 3) ( 4/ 5) octal check. Ref: 'form=1245667' <-> Res: 'form=1245667' Pass.
( 3) ( 5/ 5) octal check. Ref: 'form=1245667' <-> Res: 'form=1245667' Pass.
( 4) ( 1/ 5) binary check. Ref: 'form=10101110' <-> Res: 'form=10101110' Pass.
( 4) ( 2/ 5) binary check. Ref: 'form= 10101110' <-> Res: 'form= 10101110' Pass.
( 4) ( 3/ 5) binary check. Ref: 'form=0000010101110' <-> Res: 'form=0000010101110' Pass.
( 4) ( 4/ 5) binary check. Ref: 'form=10101110' <-> Res: 'form=10101110' Pass.
( 4) ( 5/ 5) binary check. Ref: 'form=10101110' <-> Res: 'form=10101110' Pass.
( 5) ( 1/10) hex-decimal check. Ref: 'form=12a4bf9c' <-> Res: 'form=12a4bf9c' Pass.
( 5) ( 2/10) hex-decimal check. Ref: 'form= 12a4bf9c' <-> Res: 'form= 12a4bf9c' Pass.
( 5) ( 3/10) hex-decimal check. Ref: 'form=012a4bf9c' <-> Res: 'form=012a4bf9c' Pass.
( 5) ( 4/10) hex-decimal check. Ref: 'form=12a4bf9c' <-> Res: 'form=12a4bf9c' Pass.
( 5) ( 5/10) hex-decimal check. Ref: 'form=12a4bf9c' <-> Res: 'form=12a4bf9c' Pass.
( 5) ( 6/10) hex-decimal check. Ref: 'form=12A4BF9C' <-> Res: 'form=12A4BF9C' Pass.
( 5) ( 7/10) hex-decimal check. Ref: 'form= 12A4BF9C' <-> Res: 'form= 12A4BF9C' Pass.
( 5) ( 8/10) hex-decimal check. Ref: 'form=012A4BF9C' <-> Res: 'form=012A4BF9C' Pass.
( 5) ( 9/10) hex-decimal check. Ref: 'form=12A4BF9C' <-> Res: 'form=12A4BF9C' Pass.
( 5) (10/10) hex-decimal check. Ref: 'form=12A4BF9C' <-> Res: 'form=12A4BF9C' Pass.
( 6) ( 1/10) positive decimal check. Ref: 'form=12345678' <-> Res: 'form=12345678' Pass.
( 6) ( 2/10) positive decimal check. Ref: 'form=4282621618' <-> Res: 'form=4282621618' Pass.
( 6) ( 3/10) positive decimal check. Ref: 'form= 12345678' <-> Res: 'form= 12345678' Pass.
( 6) ( 4/10) positive decimal check. Ref: 'form= 4282621618' <-> Res: 'form= 4282621618' Pass.
( 6) ( 5/10) positive decimal check. Ref: 'form=000012345678' <-> Res: 'form=000012345678' Pass.
( 6) ( 6/10) positive decimal check. Ref: 'form=004282621618' <-> Res: 'form=004282621618' Pass.
( 6) ( 7/10) positive decimal check. Ref: 'form=12345678' <-> Res: 'form=12345678' Pass.
( 6) ( 8/10) positive decimal check. Ref: 'form=4282621618' <-> Res: 'form=4282621618' Pass.
( 6) ( 9/10) positive decimal check. Ref: 'form=12345678' <-> Res: 'form=12345678' Pass.
( 6) (10/10) positive decimal check. Ref: 'form=4282621618' <-> Res: 'form=4282621618' Pass.
( 7) ( 1/12) floating point check. Ref: 'form=2.236068' <-> Res: 'form=2.236068' Pass.
( 7) ( 2/12) floating point check. Ref: 'form=-2.236068' <-> Res: 'form=-2.236068' Pass.
( 7) ( 3/12) floating point check. Ref: 'form=2.23606801' <-> Res: 'form=2.23606801' Pass.
( 7) ( 4/12) floating point check. Ref: 'form=-2.23606801' <-> Res: 'form=-2.23606801' Pass.
( 7) ( 5/12) floating point check. Ref: 'form=2.236068' <-> Res: 'form=2.236068' Pass.
( 7) ( 6/12) floating point check. Ref: 'form=-2.236068' <-> Res: 'form=-2.236068' Pass.
( 7) ( 7/12) floating point check. Ref: 'form=2.2361' <-> Res: 'form=2.2361' Pass.
( 7) ( 8/12) floating point check. Ref: 'form=-2.2361' <-> Res: 'form=-2.2361' Pass.
( 7) ( 9/12) floating point check. Ref: 'form=2.2361' <-> Res: 'form=2.2361' Pass.
( 7) (10/12) floating point check. Ref: 'form=-2.2361' <-> Res: 'form=-2.2361' Pass.
( 7) (11/12) floating point check. Ref: 'form= 2' <-> Res: 'form= 2' Pass.
( 7) (12/12) floating point check. Ref: 'form= -2' <-> Res: 'form= -2' Pass.
( 8) ( 1/20) floating point (exponent) check. Ref: 'form=1.025001e+05' <-> Res: 'form=1.025001e+05' Pass.
( 8) ( 2/20) floating point (exponent) check. Ref: 'form=3.250000e-08' <-> Res: 'form=3.250000e-08' Pass.
( 8) ( 3/20) floating point (exponent) check. Ref: 'form=-1.075001e+05' <-> Res: 'form=-1.075001e+05' Pass.
( 8) ( 4/20) floating point (exponent) check. Ref: 'form=-6.250000e-08' <-> Res: 'form=-6.250000e-08' Pass.
( 8) ( 5/20) floating point (exponent) check. Ref: 'form=1.025001e+05' <-> Res: 'form=1.025001e+05' Pass.
( 8) ( 6/20) floating point (exponent) check. Ref: 'form=3.250000e-08' <-> Res: 'form=3.250000e-08' Pass.
( 8) ( 7/20) floating point (exponent) check. Ref: 'form=-1.075001e+05' <-> Res: 'form=-1.075001e+05' Pass.
( 8) ( 8/20) floating point (exponent) check. Ref: 'form=-6.250000e-08' <-> Res: 'form=-6.250000e-08' Pass.
( 8) ( 9/20) floating point (exponent) check. Ref: 'form=1.025001e+05' <-> Res: 'form=1.025001e+05' Pass.
( 8) (10/20) floating point (exponent) check. Ref: 'form=3.250000e-08' <-> Res: 'form=3.250000e-08' Pass.
( 8) (11/20) floating point (exponent) check. Ref: 'form=-1.075001e+05' <-> Res: 'form=-1.075001e+05' Pass.
( 8) (12/20) floating point (exponent) check. Ref: 'form=-6.250000e-08' <-> Res: 'form=-6.250000e-08' Pass.
( 8) (13/20) floating point (exponent) check. Ref: 'form=1.0250e+05' <-> Res: 'form=1.0250e+05' Pass.
( 8) (14/20) floating point (exponent) check. Ref: 'form=3.2500e-08' <-> Res: 'form=3.2500e-08' Pass.
( 8) (15/20) floating point (exponent) check. Ref: 'form=-1.0750e+05' <-> Res: 'form=-1.0750e+05' Pass.
( 8) (16/20) floating point (exponent) check. Ref: 'form=-6.2500e-08' <-> Res: 'form=-6.2500e-08' Pass.
( 8) (17/20) floating point (exponent) check. Ref: 'form=1.0250e+05' <-> Res: 'form=1.0250e+05' Pass.
( 8) (18/20) floating point (exponent) check. Ref: 'form=3.2500e-08' <-> Res: 'form=3.2500e-08' Pass.
( 8) (19/20) floating point (exponent) check. Ref: 'form=-1.0750e+05' <-> Res: 'form=-1.0750e+05' Pass.
( 8) (20/20) floating point (exponent) check. Ref: 'form=-6.2500e-08' <-> Res: 'form=-6.2500e-08' Pass.
( 9) ( 1/ 5) string format check. Ref: 'AbcdEFG' <-> Res: 'AbcdEFG' Pass.
( 9) ( 2/ 5) string format check. Ref: ' AbcdEFG' <-> Res: ' AbcdEFG' Pass.
( 9) ( 3/ 5) string format check. Ref: '00AbcdEFG' <-> Res: '00AbcdEFG' Pass.
( 9) ( 4/ 5) string format check. Ref: 'AbcdEFG' <-> Res: 'AbcdEFG' Pass.
( 9) ( 5/ 5) string format check. Ref: 'AbcdEFG' <-> Res: 'AbcdEFG' Pass.
(10) ( 1/ 1) format poniter to nullptr, error code check. Pass.
(11) ( 1/ 5) different type (float): '%s' error check. Pass.
(11) ( 2/ 5) different type (float): '%d' error check. Pass.
(11) ( 3/ 5) different type (float): '%c' error check. Pass.
(11) ( 4/ 5) different type (float): '%u' error check. Pass.
(11) ( 5/ 5) different type (float): '%p' error check. Pass.
(12) ( 1/ 1) pointer type check. Ref: '000000A020F8F9B4' <-> Res: '000000A020F8F9B4' Pass.
(13) ( 1/ 1) floating point 'inf' (infinity) check. Ref: 'inf' <-> Res: 'inf' Pass.
(14) ( 1/ 4) different type (int): '%s' error check. Pass.
(14) ( 2/ 4) different type (int): '%f' error check. Pass.
(14) ( 3/ 4) different type (int): '%p' error check. Pass.
(14) ( 4/ 4) different type (int): '%g' error check. Pass.
(15) ( 1/ 8) fixed point check. Ref: '0.016' <-> Res: '0.016' Pass.
(15) ( 2/ 8) fixed point check. Ref: '0.059' <-> Res: '0.059' Pass.
(15) ( 3/ 8) fixed point check. Ref: '0.097' <-> Res: '0.097' Pass.
(15) ( 4/ 8) fixed point check. Ref: '0.488' <-> Res: '0.488' Pass.
(15) ( 5/ 8) fixed point check. Ref: '0.732' <-> Res: '0.732' Pass.
(15) ( 6/ 8) fixed point check. Ref: '0.875' <-> Res: '0.875' Pass.
(15) ( 7/ 8) fixed point check. Ref: '0.976' <-> Res: '0.976' Pass.
(15) ( 8/ 8) fixed point check. Ref: '1.000' <-> Res: '1.000' Pass.
(16) ( 1/ 1) floating point '-1' check. Ref: '-99.000000' <-> Res: '-99.000000' Pass.
(17) ( 1/ 1) floating point '%-' check. Ref: '-99.000000' <-> Res: '-99.000000' Pass.
(18) ( 1/ 1) report pointer (char*) '%p' check. Ref: '000000A020F8F9C0' <-> Res: '000000A020F8F9C0' Pass.
(19) ( 1/ 1) report pointer (int*) '%p' check. Ref: '00007FF6C43E3940' <-> Res: '00007FF6C43E3940' Pass.
(20) ( 1/22) floating point '%g' check. Ref: '1e+07' <-> Res: '1e+07' Pass.
(20) ( 2/22) floating point '%g' check. Ref: '1.41421E+07' <-> Res: '1.41421E+07' Pass.
(20) ( 3/22) floating point '%g' check. Ref: '1e+06' <-> Res: '1e+06' Pass.
(20) ( 4/22) floating point '%g' check. Ref: '1.41421E+06' <-> Res: '1.41421E+06' Pass.
(20) ( 5/22) floating point '%g' check. Ref: '100000' <-> Res: '100000' Pass.
(20) ( 6/22) floating point '%g' check. Ref: '141421' <-> Res: '141421' Pass.
(20) ( 7/22) floating point '%g' check. Ref: '-100000' <-> Res: '-100000' Pass.
(20) ( 8/22) floating point '%g' check. Ref: '-141421' <-> Res: '-141421' Pass.
(20) ( 9/22) floating point '%g' check. Ref: '1000' <-> Res: '1000' Pass.
(20) (10/22) floating point '%g' check. Ref: '1414.21' <-> Res: '1414.21' Pass.
(20) (11/22) floating point '%g' check. Ref: '1' <-> Res: '1' Pass.
(20) (12/22) floating point '%g' check. Ref: '1.41421' <-> Res: '1.41421' Pass.
(20) (13/22) floating point '%g' check. Ref: '0.001' <-> Res: '0.001' Pass.
(20) (14/22) floating point '%g' check. Ref: '0.00141421' <-> Res: '0.00141421' Pass.
(20) (15/22) floating point '%g' check. Ref: '-1e-05' <-> Res: '-1e-05' Pass.
(20) (16/22) floating point '%g' check. Ref: '-1.41421E-05' <-> Res: '-1.41421E-05' Pass.
(20) (17/22) floating point '%g' check. Ref: '1e-05' <-> Res: '1e-05' Pass.
(20) (18/22) floating point '%g' check. Ref: '1.41421E-05' <-> Res: '1.41421E-05' Pass.
(20) (19/22) floating point '%g' check. Ref: '1e-06' <-> Res: '1e-06' Pass.
(20) (20/22) floating point '%g' check. Ref: '1.41421E-06' <-> Res: '1.41421E-06' Pass.
(20) (21/22) floating point '%g' check. Ref: '1e-07' <-> Res: '1e-07' Pass.
(20) (22/22) floating point '%g' check. Ref: '1.41421E-07' <-> Res: '1.41421E-07' Pass.
(21) ( 1/22) floating point '%8g' check. Ref: '1.666e+07' <-> Res: '1.666e+07' Pass.
(21) ( 2/22) floating point '%8g' check. Ref: '1.41421E+07' <-> Res: '1.41421E+07' Pass.
(21) ( 3/22) floating point '%8g' check. Ref: '1.666e+06' <-> Res: '1.666e+06' Pass.
(21) ( 4/22) floating point '%8g' check. Ref: '1.41421E+06' <-> Res: '1.41421E+06' Pass.
(21) ( 5/22) floating point '%8g' check. Ref: ' 166600' <-> Res: ' 166600' Pass.
(21) ( 6/22) floating point '%8g' check. Ref: ' 141421' <-> Res: ' 141421' Pass.
(21) ( 7/22) floating point '%8g' check. Ref: ' -166600' <-> Res: ' -166600' Pass.
(21) ( 8/22) floating point '%8g' check. Ref: ' -141421' <-> Res: ' -141421' Pass.
(21) ( 9/22) floating point '%8g' check. Ref: ' 1666' <-> Res: ' 1666' Pass.
(21) (10/22) floating point '%8g' check. Ref: ' 1414.21' <-> Res: ' 1414.21' Pass.
(21) (11/22) floating point '%8g' check. Ref: ' 1.666' <-> Res: ' 1.666' Pass.
(21) (12/22) floating point '%8g' check. Ref: ' 1.41421' <-> Res: ' 1.41421' Pass.
(21) (13/22) floating point '%8g' check. Ref: '0.001666' <-> Res: '0.001666' Pass.
(21) (14/22) floating point '%8g' check. Ref: '0.00141421' <-> Res: '0.00141421' Pass.
(21) (15/22) floating point '%8g' check. Ref: '-1.666e-05' <-> Res: '-1.666e-05' Pass.
(21) (16/22) floating point '%8g' check. Ref: '-1.41421E-05' <-> Res: '-1.41421E-05' Pass.
(21) (17/22) floating point '%8g' check. Ref: '1.666e-05' <-> Res: '1.666e-05' Pass.
(21) (18/22) floating point '%8g' check. Ref: '1.41421E-05' <-> Res: '1.41421E-05' Pass.
(21) (19/22) floating point '%8g' check. Ref: '1.666e-06' <-> Res: '1.666e-06' Pass.
(21) (20/22) floating point '%8g' check. Ref: '1.41421E-06' <-> Res: '1.41421E-06' Pass.
(21) (21/22) floating point '%8g' check. Ref: '1.666e-07' <-> Res: '1.666e-07' Pass.
(21) (22/22) floating point '%8g' check. Ref: '1.41421E-07' <-> Res: '1.41421E-07' Pass.
(22) ( 1/ 1) floating point 'nan' (not a number) check. Ref: ' nan' <-> Res: ' nan' Pass.
(23) ( 1/ 1) '%' check. Ref: '1234abcdefg%ABCDEFG5678' <-> Res: '1234abcdefg%ABCDEFG5678' Pass.
(24) ( 1/ 1) '%q' check. Ref: 'aaa q bbb' <-> Res: 'aaa q bbb' Error: unknown type. Pass.
(25) ( 1/ 5) binary check. Ref: 'form=110110011011011100101011010110101110' <-> Res: 'form=110110011011011100
101011010110101110' Pass.
(25) ( 2/ 5) binary check. Ref: 'form= 110110011011011100101011010110101110' <-> Res: 'form= 110110011011
011100101011010110101110' Pass.
(25) ( 3/ 5) binary check. Ref: 'form=00110110011011011100101011010110101110' <-> Res: 'form=0011011001101101
1100101011010110101110' Pass.
(25) ( 4/ 5) binary check. Ref: 'form= 110110011011011100101011010110101110' <-> Res: 'form= 1101100110110111
00101011010110101110' Pass.
(25) ( 5/ 5) binary check. Ref: 'form=110110011011011100101011010110101110' <-> Res: 'form=110110011011011100
101011010110101110' Pass.
(26) ( 1/ 5) decimal 64 bits check. Ref: 'form=37812750652850076' <-> Res: 'form=37812750652850076' Pass.
(26) ( 2/ 5) decimal 64 bits check. Ref: 'form=-37812750652850173' <-> Res: 'form=-37812750652850173' Pass.
(26) ( 3/ 5) decimal 64 bits check. Ref: 'form= 37812750652849979' <-> Res: 'form= 37812750652849979' Pa
ss.
(26) ( 4/ 5) decimal 64 bits check. Ref: 'form= -37812750652850270' <-> Res: 'form= -37812750652850270' Pa
ss.
(26) ( 5/ 5) decimal 64 bits check. Ref: 'form=0000000037812750652849882' <-> Res: 'form=00000000378127506528
49882' Pass.
(26) ( 6/ 5) decimal 64 bits check. Ref: 'form=-000000037812750652850367' <-> Res: 'form=-0000000378127506528
50367' Pass.
(26) ( 7/ 5) decimal 64 bits check. Ref: 'form= 37812750652849785' <-> Res: 'form= 37812750652849785' Pa
ss.
(26) ( 8/ 5) decimal 64 bits check. Ref: 'form= -37812750652850464' <-> Res: 'form= -37812750652850464' Pa
ss.
(26) ( 9/ 5) decimal 64 bits check. Ref: 'form=37812750652849688' <-> Res: 'form=37812750652849688' Pass.
(26) (10/ 5) decimal 64 bits check. Ref: 'form=-37812750652850561' <-> Res: 'form=-37812750652850561' Pass.
(27) ( 1/10) hex-decimal 64 bits check. Ref: 'form=567f12a4bf9c' <-> Res: 'form=567f12a4bf9c' Pass.
(27) ( 2/10) hex-decimal 64 bits check. Ref: 'form= 567f12a4bf9c' <-> Res: 'form= 567f12a4bf9c' Pass.
(27) ( 3/10) hex-decimal 64 bits check. Ref: 'form=000567f12a4bf9c' <-> Res: 'form=000567f12a4bf9c' Pass.
(27) ( 4/10) hex-decimal 64 bits check. Ref: 'form=567f12a4bf9c' <-> Res: 'form=567f12a4bf9c' Pass.
(27) ( 5/10) hex-decimal 64 bits check. Ref: 'form=567f12a4bf9c' <-> Res: 'form=567f12a4bf9c' Pass.
(27) ( 6/10) hex-decimal 64 bits check. Ref: 'form=567F12A4BF9C' <-> Res: 'form=567F12A4BF9C' Pass.
(27) ( 7/10) hex-decimal 64 bits check. Ref: 'form= 567F12A4BF9C' <-> Res: 'form= 567F12A4BF9C' Pass.
(27) ( 8/10) hex-decimal 64 bits check. Ref: 'form=000567F12A4BF9C' <-> Res: 'form=000567F12A4BF9C' Pass.
(27) ( 9/10) hex-decimal 64 bits check. Ref: 'form=567F12A4BF9C' <-> Res: 'form=567F12A4BF9C' Pass.
(27) (10/10) hex-decimal 64 bits check. Ref: 'form=567F12A4BF9C' <-> Res: 'form=567F12A4BF9C' Pass.
format class Version: 121
All Pass: 27/27
input クラス
Github input class で公開しているコードを更新した。
( 1) ( 1/ 2) Integer input (type int): '123456789' ---> 123456789 Pass.
( 1) ( 2/ 2) Integer input (type int): '-123456789' ---> -123456789 Pass.
( 2) ( 1/ 2) Floating point input (type float exponent): '2.5439e3' ---> 2.543900e+03 Pass.
( 2) ( 2/ 2) Floating point input (type float exponent): '-2.5439e3' ---> -2.543900e+03 Pass.
( 3) ( 1/ 1) Integer (uint32_t) max value conversion: '4294967295' ---> 4294967295 Pass.
( 4) ( 1/ 1) Fail conversion state check, initial value hold: '8o0173476' 123456789 ---> 123456789 Pass.
( 5) ( 1/ 1) Multi scan for integer (%d[, ]%x[, ]%d): '-98516 105aBd3,21369871' (3) -98516, 105abd3, 21369871
Pass.
( 6) ( 1/ 1) Multi scan for integer (%d[, ]%x,%d): '-9577463,fa4c57ab,23645687' (3) -9577463, fa4c57ab, 236456
87 Pass.
( 7) ( 1/ 1) Multi scan for (%d,%f,%c): '-17743347,-1273.75941,Z' (3) -17743347, -1273.759399, Z Pass.
( 8) ( 1/ 1) Multi scan for (%f,%d,%x,%o): '101.945678,-76437583,7fdcab5f,7453642341' (4) 101.945679, -7643758
3, 7fdcab5f, 7453642341 Pass.
( 9) ( 1/ 1) Multi scan for 'int' at spacing ( %d %d %d): ' 100 250 300' (3) 100, 250, 300 Pass.
(10) ( 1/ 1) Multi scan for 'auto' (%a %a %a %a): '100 0x9a 0b1101 0o775' (4) 100, 154, 13, 509 Pass.
(11) ( 1/ 1) Multi scan for 'auto' (%a %a %a %a %a): '100 x9a b1101 o775 -123.4567' (5) 100, 154, 13, 509, -12
3.456703 Pass.
(12) ( 1/ 1) Multi scan for (%b %o %d %x %f %c): '11011 0625 -985 4a7Bc 1.025 Y' (6) 27, 405, -985, 4a7bc, 1.0
25000, Y Pass.
(13) ( 1/ 1) Check signed integer error (%d): '-8964743' ---> 0 Pass.
(14) ( 1/ 1) Check hexa-decimal conversion for signed integer (%x): '-7ffe9283' ---> 80016d7d Pass.
(15) ( 1/ 1) Check signed type error (%d): '-8967464' ---> 0 Pass.
(16) ( 1/ 1) Integer input 'std::string' as (%d): '56789' ---> 56789 Pass.
(17) ( 1/ 1) Overflowed floting point input as (%f): '0.555555555555' ---> 0.555556 Pass.
(18) ( 1/ 1) Overflowed integer32 '2147483647' (%d) error check input as '2147483648' ---> -2147483648 Pass.
(19) ( 1/ 1) Overflowed floting point input as (%f): '987643214321' ---> 987643200.000000 Pass.
(20) ( 1/ 1) Overflowed binary error check input (%b): '101010101010101010101010101010101' ---> 0xaaaaaaaa Pa
ss.
(21) ( 1/ 1) Overflowed hexa-decimal error check input (%x): 'a290fc4b1' ---> 0xa290fc4b Pass.
(22) ( 1/ 1) Overflowed octal error check input (%o): '65234223514' ---> 354e24e9 Pass.
(23) ( 1/ 1) Special character separator (%d\%%d\[%d\]%d): '123%456[789]5678' (4) 123, 456, 789, 5678 Pass.
(24) ( 1/ 1) Floating point conversion for (%f): '123456789' ---> 123456792.000000 Pass.
(25) ( 1/ 1) Floating point conversion (%f): '.123456789) ---> 0.123457 Pass.
(26) ( 1/ 1) Floating point conversion (%f): '-.123456789' ---> -0.123457 Pass.
(27) ( 1/ 1) Floating point conversion (%f): '.123456789e-3' ---> 0.000123 Pass.
(28) ( 1/ 1) Floating point conversion (%f): '-.123456789e-3' ---> -0.000123 Pass.
(29) ( 1/ 1) Integer (uint64_t) max value conversion: '18446744073709551615' ---> 18446744073709551615 Pass.
(30) ( 1/ 1) Overflowed int64_t at '9223372036854775807' (%d) error check input as '9223372036854775808' --->
-9223372036854775808 Pass.
(31) ( 1/ 2) Integer input (type short): '23456' ---> 23456 Pass.
(31) ( 2/ 2) Integer input (type short): '-23456' ---> -23456 Pass.
(32) ( 1/ 2) Integer input (type uint16_t): '45678' ---> 45678 Pass.
(32) ( 2/ 2) Integer input (type uint16_t): '56789' ---> 56789 Pass.
input class Version: 112
All Pass: 32/32