単体テストを追加
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<useArrayBounds>0</useArrayBounds>
|
||||
<noboundscheck>0</noboundscheck>
|
||||
<useSwitchError>0</useSwitchError>
|
||||
<useUnitTests>0</useUnitTests>
|
||||
<useUnitTests>1</useUnitTests>
|
||||
<useInline>0</useInline>
|
||||
<release>0</release>
|
||||
<preservePaths>0</preservePaths>
|
||||
@@ -44,7 +44,7 @@
|
||||
<pic>0</pic>
|
||||
<cov>0</cov>
|
||||
<nofloat>0</nofloat>
|
||||
<Dversion>2.043</Dversion>
|
||||
<Dversion>2</Dversion>
|
||||
<ignoreUnsupportedPragmas>0</ignoreUnsupportedPragmas>
|
||||
<allinst>0</allinst>
|
||||
<stackStomp>0</stackStomp>
|
||||
@@ -205,13 +205,10 @@
|
||||
<filesToClean>*.obj;*.cmd;*.build;*.json;*.dep</filesToClean>
|
||||
</Config>
|
||||
<Folder name="SMILEBASIC">
|
||||
<Folder name="otya">
|
||||
<Folder name="smilebasic" />
|
||||
<File path="node.d" />
|
||||
<File path="parser.d" />
|
||||
<File path="token.d" />
|
||||
<File path="type.d" />
|
||||
</Folder>
|
||||
<File path="main.d" />
|
||||
<File path="node.d" />
|
||||
<File path="parser.d" />
|
||||
<File path="token.d" />
|
||||
<File path="type.d" />
|
||||
</Folder>
|
||||
</DProject>
|
||||
|
||||
@@ -2,5 +2,6 @@ import std.stdio;
|
||||
int main(string[] argv)
|
||||
{
|
||||
writeln("Hello D-World!");
|
||||
readln();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,22 @@ class Lexical
|
||||
}
|
||||
unittest
|
||||
{
|
||||
auto lex = new Lexical("1");
|
||||
|
||||
{
|
||||
auto lex = new Lexical("1");
|
||||
assert(lex.empty() == false);
|
||||
lex.popFront();
|
||||
auto token = lex.front();
|
||||
assert(token.type == TokenType.Integer);
|
||||
assert(token.value.integerValue == 1);
|
||||
}
|
||||
{
|
||||
auto lex = new Lexical("12345");
|
||||
assert(lex.empty() == false);
|
||||
lex.popFront();
|
||||
auto token = lex.front();
|
||||
assert(token.type == TokenType.Integer);
|
||||
assert(token.value.integerValue == 12345);
|
||||
}
|
||||
}
|
||||
class Parser
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user