Skip to content

Commit 3892f27

Browse files
committed
Removed UNIT_TESTS compilation symbol and DebugTests configuration.
1 parent 6eef294 commit 3892f27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1640
-158
lines changed

.nuget/packages.config

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="xunit.runners" version="1.9.1" />
4+
</packages>

CommandLine.Dist.sln

-74
This file was deleted.

CommandLine.sln

+5-11
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,35 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{18282A82-E
2626
README.md = README.md
2727
EndProjectSection
2828
EndProject
29+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{350E598F-50C7-45A2-83A6-346AF7D163F5}"
30+
ProjectSection(SolutionItems) = preProject
31+
.nuget\packages.config = .nuget\packages.config
32+
EndProjectSection
33+
EndProject
2934
Global
3035
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3136
Debug|Any CPU = Debug|Any CPU
3237
Debug|x86 = Debug|x86
33-
DebugTests|Any CPU = DebugTests|Any CPU
34-
DebugTests|x86 = DebugTests|x86
3538
Release|Any CPU = Release|Any CPU
3639
Release|x86 = Release|x86
3740
EndGlobalSection
3841
GlobalSection(ProjectConfigurationPlatforms) = postSolution
3942
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4043
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
4144
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.Debug|x86.ActiveCfg = Debug|Any CPU
42-
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.DebugTests|Any CPU.ActiveCfg = DebugTests|Any CPU
43-
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.DebugTests|Any CPU.Build.0 = DebugTests|Any CPU
44-
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.DebugTests|x86.ActiveCfg = DebugTests|Any CPU
4545
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
4646
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.Release|Any CPU.Build.0 = Release|Any CPU
4747
{5DEA2811-2FFA-4959-830B-CAD3ACACABEB}.Release|x86.ActiveCfg = Release|Any CPU
4848
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4949
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
5050
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.Debug|x86.ActiveCfg = Debug|Any CPU
51-
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.DebugTests|Any CPU.ActiveCfg = Debug|Any CPU
52-
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.DebugTests|Any CPU.Build.0 = Debug|Any CPU
53-
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.DebugTests|x86.ActiveCfg = Debug|Any CPU
5451
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
5552
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.Release|Any CPU.Build.0 = Release|Any CPU
5653
{86E1AC34-ED2D-4E42-8B95-65208FEA36C2}.Release|x86.ActiveCfg = Release|Any CPU
5754
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Debug|Any CPU.ActiveCfg = Debug|x86
5855
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Debug|Any CPU.Build.0 = Debug|x86
5956
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Debug|x86.ActiveCfg = Debug|x86
6057
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Debug|x86.Build.0 = Debug|x86
61-
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.DebugTests|Any CPU.ActiveCfg = Debug|x86
62-
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.DebugTests|Any CPU.Build.0 = Debug|x86
63-
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.DebugTests|x86.ActiveCfg = Debug|x86
6458
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Release|Any CPU.ActiveCfg = Release|x86
6559
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Release|Any CPU.Build.0 = Release|x86
6660
{9E573FFF-4ECB-4C59-A914-C0B74D44D2E8}.Release|x86.ActiveCfg = Release|x86

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Command Line Parser Library 1.9.4.203 beta for CLR.
1+
Command Line Parser Library 1.9.4.205 beta for CLR.
22
===
33
The Command Line Parser Library offers to CLR applications a clean and concise API for manipulating command line arguments and related tasks defining switches, options and verb commands. It allows you to display an help screen with an high degree of customization and a simple way to report syntax errors to the end user. Everything that is boring and repetitive to be programmed stands up on library shoulders, letting developers concentrate on core logic.
44
__The search for the command line parser for your application is over, with this library you got a solid parsing API constantly updated since 2005.__
@@ -11,7 +11,8 @@ Compatibility:
1111

1212
News:
1313
---
14-
- All names of test fixture methods changed to a new convention (using https://gist.github.com/4655503).
14+
- Removed compilation symbol UNIT_TESTS and DebugTests configuration.
15+
- All names of test fixture methods changed to a new convention (using https://gist.github.com/4655503).
1516
- Started refactoring on test project (migrating from NUnit to Xunit).
1617
- Thanks to @marcells, we can reference CommandLine.dll from CommandLine.Tests.dll keeping strong name.
1718
- Introduced ``ValueOptionAttribute`` enhancement of issue #33.

Rakefile.rb

+17-29
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
PRODUCT = "Command Line Parser Library"
22
DESCRIPTION = "Command Line Parser Library allows CLR applications to define a syntax for parsing command line arguments."
33
INF_VERSION = "1.9"
4-
VERSION = INF_VERSION + ".4.203"
4+
VERSION = INF_VERSION + ".4.205"
55
COPYRIGHT = "Copyright (c) 2005 - 2013 Giacomo Stelluti Scala"
66
LICENSE_URL = "https://raw.github.com/gsscoder/commandline/master/doc/LICENSE"
77
PROJECT_URL = "https://github.com/gsscoder/commandline"
88

99
require 'albacore'
1010

11-
task :default => [:build]
11+
task :default => [:build, :test]
1212

1313
if RUBY_VERSION =~ /^1\.8/
1414
class Dir
@@ -34,50 +34,38 @@ def invoke_runtime(cmd)
3434
end
3535

3636
CONFIGURATION = "Release"
37-
CONFIGURATION_TESTS = "DebugTests"
3837
BUILD_DIR = File.expand_path("build")
3938
OUTPUT_DIR = "#{BUILD_DIR}/out"
40-
OUTPUT_DIR_TESTS = "#{OUTPUT_DIR}/tests"
4139
SOURCE_DIR = File.expand_path("src")
4240
LIB_DIR = "#{SOURCE_DIR}/libcmdline"
4341

4442
msbuild :build_msbuild do |b|
4543
b.properties :configuration => CONFIGURATION, "OutputPath" => OUTPUT_DIR
4644
b.targets :Build
47-
b.solution = "CommandLine.Dist.sln"
48-
end
49-
50-
msbuild :build_msbuild_test do |b|
51-
b.properties :configuration => CONFIGURATION_TESTS, "OutputPath" => OUTPUT_DIR_TESTS
52-
b.targets :Build
5345
b.solution = "CommandLine.sln"
5446
end
5547

56-
xbuild :build_xbuild do |b|
57-
b.properties :configuration => CONFIGURATION, "OutputPath" => OUTPUT_DIR
58-
b.targets :Build
59-
b.solution = "CommandLine.Dist.sln"
60-
end
48+
#xbuild :build_xbuild do |b|
49+
# b.properties :configuration => CONFIGURATION, "OutputPath" => OUTPUT_DIR
50+
# b.targets :Build
51+
# b.solution = "CommandLine.sln"
52+
#end
6153

62-
xbuild :build_xbuild_test do |b|
63-
b.properties :configuration => CONFIGURATION_TESTS, "OutputPath" => OUTPUT_DIR_TESTS
64-
b.targets :Build
65-
b.solution = "CommandLine.sln"
66-
end
54+
task :build_mdtool do
55+
mdtool = "mdtool build -c:Debug CommandLine.sln"
56+
sh "#{mdtool}"
57+
FileUtils.mkdir_p "#{OUTPUT_DIR}"
58+
FileUtils.cp_r Dir.glob("#{SOURCE_DIR}/tests/bin/Debug/*"), "#{OUTPUT_DIR}"
59+
end
6760

6861
task :build => :clean do |b|
69-
build_task = is_nix() ? "build_xbuild" : "build_msbuild"
70-
Rake::Task[build_task].invoke
71-
end
72-
73-
task :build_test => :clean do |b|
74-
build_task = is_nix() ? "build_xbuild_test" : "build_msbuild_test"
62+
build_task = is_nix() ? "build_mdtool" : "build_msbuild"
7563
Rake::Task[build_task].invoke
7664
end
7765

78-
task :test => :build_test do
79-
nunit = invoke_runtime("packages/NUnit.2.5.10.11092/tools/nunit-console.exe")
80-
sh "#{nunit} -labels #{OUTPUT_DIR_TESTS}/CommandLine.Tests.dll"
66+
task :test => :build do
67+
xunit = invoke_runtime("packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe")
68+
sh "#{xunit} #{OUTPUT_DIR}/CommandLine.Tests.dll"
8169
end
8270

8371
task :strings do

build/out/CommandLine.Tests.dll

92.5 KB
Binary file not shown.

build/out/CommandLine.Tests.dll.mdb

41.7 KB
Binary file not shown.

build/out/CommandLine.dll

56.5 KB
Binary file not shown.

build/out/CommandLine.dll.mdb

28.9 KB
Binary file not shown.

build/out/FluentAssertions.dll

163 KB
Binary file not shown.

build/out/xunit.dll

67 KB
Binary file not shown.

doc/ChangeLog

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2013-01-29 Giacomo Stelluti Scala <[email protected]>
2+
3+
* Better constructor chaining in CommandLineParserSettings.
4+
* ReflectionUtil leaved open for testing also in Release build (I'll try to remove S symbol
5+
in every part of the project).
6+
* Removed conditional compylation symbol #UNIT_TESTS from OptionAttribute.cs.
7+
* Removed conditional compylation symbol #UNIT_TESTS from ArgumentParser.cs.
8+
* Removed conditional compylation symbol #UNIT_TESTS from OptionInfo.cs.
9+
* Used same key to sign both assemblies (main, tests).
10+
* Removed DebugTests compilation target (tied to #UNIT_TESTS symbol).
11+
* Added xunit.runners to solution.
12+
* Removed CommandLine.Dist.sln, xbuild replaced by mdtool.
13+
* Rakefile now build and test as whole.
14+
* Version incremented to 1.9.4.205 beta.
15+
116
2013-01-28 Giacomo Stelluti Scala <[email protected]>
217

318
* All name of test fixture methods changed to a new convention (e.g.: A_descriptive_assertion)

doc/README

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Command Line Parser Library
33
Project Author/Coordinator: Giacomo Stelluti Scala
44
Main Contributor(s): Steven Evans, Kevin Moore, Dan Nemec (nemec), Alexander Fast (mizipzor)
55
--------------------------------------------------------------------------------------------
6-
Version 1.9.4.203 beta (*1)
7-
Latest Update: 26-01-2013
6+
Version 1.9.4.205 beta (*1)
7+
Latest Update: 28-01-2013
88

99
Git home:
1010
https://github.com/gsscoder/commandline
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3+
<xsl:output method="html"/>
4+
<xsl:template match="/">
5+
<xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]></xsl:text>
6+
<html>
7+
<head>
8+
<title>
9+
xUnit.net Test Results - <xsl:value-of select="@name"/>
10+
</title>
11+
<style type="text/css">
12+
body { font-family: Calibri, Verdana, Arial, sans-serif; background-color: White; color: Black; }
13+
h2,h3,h4,h5 { margin: 0; padding: 0; }
14+
h3 { font-weight: normal; }
15+
h5 { font-weight: normal; font-style: italic; margin-bottom: 0.75em; }
16+
pre { font-family: Consolas; font-size: 85%; margin: 0 0 0 1em; padding: 0; }
17+
.divided { border-top: solid 1px #f0f5fa; padding-top: 0.5em; }
18+
.row, .altrow { padding: 0.1em 0.3em; }
19+
.row { background-color: #f0f5fa; }
20+
.altrow { background-color: #e1ebf4; }
21+
.success, .failure, .skipped { font-family: Arial Unicode MS; font-weight: normal; float: left; width: 1em; display: block; }
22+
.success { color: #0c0; }
23+
.failure { color: #c00; }
24+
.skipped { color: #cc0; }
25+
.timing { float: right; }
26+
.indent { margin: 0.25em 0 0.5em 2em; }
27+
.clickable { cursor: pointer; }
28+
.testcount { font-size: 85%; }
29+
</style>
30+
<script language="javascript">
31+
function ToggleClass(id) {
32+
var elem = document.getElementById(id);
33+
if (elem.style.display == "none") {
34+
elem.style.display = "block";
35+
}
36+
else {
37+
elem.style.display = "none";
38+
}
39+
}
40+
</script>
41+
</head>
42+
<body>
43+
<h3 class="divided"><b>Assemblies Run</b></h3>
44+
<xsl:apply-templates select="//assembly"/>
45+
46+
<h3 class="divided"><b>Summary</b></h3>
47+
<div>
48+
Tests run: <a href="#all"><b><xsl:value-of select="sum(//assembly/@total)"/></b></a> &#160;
49+
Failures: <a href="#failures"><b><xsl:value-of select="sum(//assembly/@failed)"/></b></a>,
50+
Skipped: <a href="#skipped"><b><xsl:value-of select="sum(//assembly/@skipped)"/></b></a>,
51+
Run time: <b><xsl:value-of select="sum(//assembly/@time)"/>s</b>
52+
</div>
53+
<xsl:if test="//assembly/class/test[@result='Fail']">
54+
<br />
55+
<h2><a name="failures"></a>Failed tests</h2>
56+
<xsl:apply-templates select="//assembly/class/test[@result='Fail']"><xsl:sort select="@name"/></xsl:apply-templates>
57+
</xsl:if>
58+
<xsl:if test="//assembly/class/failure">
59+
<br />
60+
<h2><a name="failures"></a>Failed fixtures</h2>
61+
<xsl:apply-templates select="//assembly/class/failure"><xsl:sort select="../@name"/></xsl:apply-templates>
62+
</xsl:if>
63+
<xsl:if test="//assembly/@skipped > 0">
64+
<br />
65+
<h2><a name="skipped"></a>Skipped tests</h2>
66+
<xsl:apply-templates select="//assembly/class/test[@result='Skip']"><xsl:sort select="@name"/></xsl:apply-templates>
67+
</xsl:if>
68+
<br />
69+
<h2><a name="all"></a>All tests</h2>
70+
<h5>Click test class name to expand/collapse test details</h5>
71+
<xsl:apply-templates select="//assembly/class"><xsl:sort select="@name"/></xsl:apply-templates>
72+
</body>
73+
</html>
74+
</xsl:template>
75+
76+
<xsl:template match="assembly">
77+
<div><xsl:value-of select="@name"/></div>
78+
</xsl:template>
79+
80+
<xsl:template match="test">
81+
<div>
82+
<xsl:attribute name="class"><xsl:if test="(position() mod 2 = 0)">alt</xsl:if>row</xsl:attribute>
83+
<xsl:if test="@result!='Skip'"><span class="timing"><xsl:value-of select="@time"/>s</span></xsl:if>
84+
<xsl:if test="@result='Skip'"><span class="timing">Skipped</span><span class="skipped">&#x2762;</span></xsl:if>
85+
<xsl:if test="@result='Fail'"><span class="failure">&#x2718;</span></xsl:if>
86+
<xsl:if test="@result='Pass'"><span class="success">&#x2714;</span></xsl:if>
87+
&#160;<xsl:value-of select="@name"/>
88+
<xsl:if test="child::node()/message"> : <xsl:value-of select="child::node()/message"/></xsl:if>
89+
<br clear="all" />
90+
<xsl:if test="failure/stack-trace">
91+
<pre><xsl:value-of select="failure/stack-trace"/></pre>
92+
</xsl:if>
93+
<xsl:if test="output">
94+
<h4>Output</h4>
95+
<pre><xsl:value-of select="output"/></pre>
96+
</xsl:if>
97+
</div>
98+
</xsl:template>
99+
100+
<xsl:template match="failure">
101+
<span class="failure">&#x2718;</span> <xsl:value-of select="../@name"/> : <xsl:value-of select="message"/><br clear="all"/>
102+
Stack Trace:<br />
103+
<pre><xsl:value-of select="stack-trace"/></pre>
104+
</xsl:template>
105+
106+
<xsl:template match="class">
107+
<h3>
108+
<span class="timing"><xsl:value-of select="@time"/>s</span>
109+
<span class="clickable">
110+
<xsl:attribute name="onclick">ToggleClass('class<xsl:value-of select="generate-id()"/>')</xsl:attribute>
111+
<xsl:attribute name="ondblclick">ToggleClass('class<xsl:value-of select="generate-id()"/>')</xsl:attribute>
112+
<xsl:if test="@failed > 0"><span class="failure">&#x2718;</span></xsl:if>
113+
<xsl:if test="@failed = 0"><span class="success">&#x2714;</span></xsl:if>
114+
&#160;<xsl:value-of select="@name"/>
115+
&#160;<span class="testcount">(<xsl:value-of select="@total"/>&#160;test<xsl:if test="@total > 1">s</xsl:if>)</span>
116+
</span>
117+
<br clear="all" />
118+
</h3>
119+
<div class="indent">
120+
<xsl:if test="@failed = 0"><xsl:attribute name="style">display: none;</xsl:attribute></xsl:if>
121+
<xsl:attribute name="id">class<xsl:value-of select="generate-id()"/></xsl:attribute>
122+
<xsl:apply-templates select="test"><xsl:sort select="@name"/></xsl:apply-templates>
123+
</div>
124+
</xsl:template>
125+
126+
</xsl:stylesheet>

0 commit comments

Comments
 (0)