Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Commit bed088d

Browse files
committed
License, Copyright and Readme, ready to go public
1 parent 29decab commit bed088d

17 files changed

+609
-38
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.hbmk

COPYRIGHT

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
hbunit is a unit-testing framework for the Harbour language.
2+
3+
Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
4+
5+
This program is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU General Public License
7+
as published by the Free Software Foundation; either version 2
8+
of the License, or (at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18+
19+
---
20+
21+
hbunit is a derivative work based on xhUnit, whose Copyright follows.
22+
23+
xhUnit: A Testing Framework for xHarbour
24+
25+
Copyright (C) 2004-2013 dionisio c. olo <http://sourceforge.net/projects/xhunit/>
26+
27+
This program is free software; you can redistribute it and/or
28+
modify it under the terms of the GNU General Public License
29+
as published by the Free Software Foundation; either version 2
30+
of the License, or (at your option) any later version.
31+
32+
This program is distributed in the hope that it will be useful,
33+
but WITHOUT ANY WARRANTY; without even the implied warranty of
34+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35+
GNU General Public License for more details.
36+
37+
You should have received a copy of the GNU General Public License
38+
along with this program; if not, write to the Free Software
39+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# [ALPHA] hbunit is a unit-testing framework for the Harbour language.
2+
3+
This is a initial work on porting the jUnit Java unit-testing framework to the Harbour languages, based on the xhUnit project.
4+
5+
## Buildind and Testing
6+
7+
Considering you have Habour (http://harbour.github.io) installed, you can run the following commands to try hbunit.
8+
9+
To build the library, run this:
10+
11+
````
12+
$> hbmk2 lib.hbp
13+
````
14+
15+
To run the tests, run this:
16+
17+
````
18+
$> hbmk2 tests.hbp
19+
$> ./bin/AllTestSuite
20+
````
21+
22+
# License
23+
24+
<pre>
25+
hbunit is a unit-testing framework for the Harbour language.
26+
27+
Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
28+
29+
This program is free software; you can redistribute it and/or
30+
modify it under the terms of the GNU General Public License
31+
as published by the Free Software Foundation; either version 2
32+
of the License, or (at your option) any later version.
33+
34+
This program is distributed in the hope that it will be useful,
35+
but WITHOUT ANY WARRANTY; without even the implied warranty of
36+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37+
GNU General Public License for more details.
38+
39+
You should have received a copy of the GNU General Public License
40+
along with this program; if not, write to the Free Software
41+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
42+
43+
---
44+
45+
hbunit is a derivative work based on xhUnit, whose Copyright follows.
46+
47+
xhUnit: A Testing Framework for xHarbour
48+
49+
Copyright (C) 2004-2013 dionisio c. olo <http://sourceforge.net/projects/xhunit/>
50+
51+
This program is free software; you can redistribute it and/or
52+
modify it under the terms of the GNU General Public License
53+
as published by the Free Software Foundation; either version 2
54+
of the License, or (at your option) any later version.
55+
56+
This program is distributed in the hope that it will be useful,
57+
but WITHOUT ANY WARRANTY; without even the implied warranty of
58+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59+
GNU General Public License for more details.
60+
61+
You should have received a copy of the GNU General Public License
62+
along with this program; if not, write to the Free Software
63+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
64+
</pre>
65+
66+
See COPYRIGHT.

include/hbunit.ch

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#define ERROR_PROCEDUREDEPTH 3
1+
//-- copyright
2+
// hbunit is a unit-testing framework for the Harbour language.
3+
//
4+
// Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
5+
//
6+
// This program is free software; you can redistribute it and/or
7+
// modify it under the terms of the GNU General Public License
8+
// as published by the Free Software Foundation; either version 2
9+
// of the License, or (at your option) any later version.
10+
//
11+
// See COPYRIGHT for more details.
12+
//++
213

3-
#define ERROR_EXECUTION 9000
4-
#define ERROR_ASSERTION 9001
5-
#define ERROR_UNKNOWNASSERTION 9002
14+
#ifndef _HBUNIT_CH
15+
#define _HBUNIT_CH
616

7-
#define ASSERT_FAILURE 8000
8-
#define ASSERT_EQUALS 8001
9-
#define ASSERT_NOTEQUALS 8002
10-
#define ASSERT_TRUE 8003
11-
#define ASSERT_FALSE 8004
12-
13-
#define ASSERTTEXT_SUBSYS "AssertSubSys"
14-
#define ASSERTTEXT_FAILURE "EAssertFailure"
15-
#define ASSERTTEXT_ERROR "EAssertError"
16-
#define ASSERTTEXT_EQUALS "Assert Equality"
17-
#define ASSERTTEXT_NOTEQUALS "Assert Inequality"
18-
#define ASSERTTEXT_TRUE "Assert Truth"
19-
#define ASSERTTEXT_FALSE "Assert Falsity"
17+
#include "hbcompat.ch"
18+
#include "hbclass.ch"
2019

20+
#endif // _HBUNIT_CH

lib.hbp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
-incpath=${hb_addons}/xhb
44
-lxhb
55
-hblib
6-
-instpath=./lib
76
-ohbunit
8-
source\textRunner.prg
9-
source\assert.prg
10-
source\test.prg
11-
source\testCase.prg
12-
source\testResult.prg
13-
source\testRunner.prg
14-
source\testSuite.prg
7+
lib\TextRunner.class.prg
8+
lib\assert.prg
9+
lib\Test.class.prg
10+
lib\TestCase.class.prg
11+
lib\TestResult.class.prg
12+
lib\TestRunner.class.prg
13+
lib\TestSuite.class.prg

lib/Test.class.prg

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
#include "hbclass.ch"
1+
//-- copyright
2+
// hbunit is a unit-testing framework for the Harbour language.
3+
//
4+
// Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
5+
//
6+
// This program is free software; you can redistribute it and/or
7+
// modify it under the terms of the GNU General Public License
8+
// as published by the Free Software Foundation; either version 2
9+
// of the License, or (at your option) any later version.
10+
//
11+
// See COPYRIGHT for more details.
12+
//++
13+
14+
#include "hbunit.ch"
215

316
CLASS TTest
417
METHOD countTestCases() virtual

lib/TestCase.class.prg

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
#include "xhb.ch"
2-
#include "hbclass.ch"
1+
//-- copyright
2+
// hbunit is a unit-testing framework for the Harbour language.
3+
//
4+
// Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
5+
//
6+
// This program is free software; you can redistribute it and/or
7+
// modify it under the terms of the GNU General Public License
8+
// as published by the Free Software Foundation; either version 2
9+
// of the License, or (at your option) any later version.
10+
//
11+
// See COPYRIGHT for more details.
12+
//++
13+
14+
#include "hbunit.ch"
315

416
CLASS TTestCase inherit TTest
517
METHOD countTestCases() INLINE 1
@@ -8,7 +20,7 @@ CLASS TTestCase inherit TTest
820
METHOD tearDown() VIRTUAL
921

1022
PROTECTED:
11-
DATA oResult as object init TTestResult():New()
23+
DATA oResult AS OBJECT INIT TTestResult():New()
1224
ENDCLASS
1325

1426
METHOD run() CLASS TTestCase

lib/TestResult.class.prg

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
#include "xhb.ch"
2-
#include "hbclass.ch"
1+
//-- copyright
2+
// hbunit is a unit-testing framework for the Harbour language.
3+
//
4+
// Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
5+
//
6+
// This program is free software; you can redistribute it and/or
7+
// modify it under the terms of the GNU General Public License
8+
// as published by the Free Software Foundation; either version 2
9+
// of the License, or (at your option) any later version.
10+
//
11+
// See COPYRIGHT for more details.
12+
//++
13+
14+
#include "hbunit.ch"
315

416
CLASS TTestResult
517
METHOD countErrors() INLINE Len( ::aErrors )
@@ -29,7 +41,7 @@ ENDCLASS
2941
METHOD run( oTest ) CLASS TTestResult
3042
LOCAL cMethod, i
3143

32-
setAssertResultObject( Self )
44+
setAssertResultObject( SELF )
3345
::getTestMethods( oTest )
3446
::nTestCases += Len( ::aMethods )
3547

lib/TestRunner.class.prg

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
#include "hbclass.ch"
1+
//-- copyright
2+
// hbunit is a unit-testing framework for the Harbour language.
3+
//
4+
// Copyright (C) 2014 Enderson maia <endersonmaia _at_ gmail _dot_ com>
5+
//
6+
// This program is free software; you can redistribute it and/or
7+
// modify it under the terms of the GNU General Public License
8+
// as published by the Free Software Foundation; either version 2
9+
// of the License, or (at your option) any later version.
10+
//
11+
// See COPYRIGHT for more details.
12+
//++
13+
14+
#include "hbunit.ch"
215

316
CLASS TTestRunner
417
METHOD run( oResult )

0 commit comments

Comments
 (0)