Skip to content

Commit 2cf22f0

Browse files
author
Food Tiny
authored
Merge pull request #248 from foodtiny/development
Minor patch for Java::Lang::String and Java::Lang::StringBuffer
2 parents d350c7b + 2fc14a5 commit 2cf22f0

23 files changed

Lines changed: 2793 additions & 2205 deletions

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ addons:
99
apt:
1010
sources:
1111
- ubuntu-toolchain-r-test
12+
- llvm-toolchain-precise-3.6
1213
packages:
14+
- g++-4.8
1315
- lcov
1416
before_script:
17+
- export CC=gcc-4.8
18+
- export CXX=g++-4.8
1519
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./misc/install_linux; fi
1620
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./misc/install_osx; fi
1721
- chmod +x misc/checkstyle.sh
@@ -22,6 +26,6 @@ script:
2226
- make native && sudo make install && sudo ldconfig
2327
- cd examples && ./build
2428
after_success:
25-
- ./misc/codecov.sh
29+
- cd $TRAVIS_BUILD_DIR && ./misc/codecov.sh
2630
notifications:
2731
slack: foodtiny:hzkLBCLrqjtgi9ctqwdQ034S

CONTRIBUTION.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,88 @@
11
# CONTRIBUTION
22

3+
##### COMMENT STYLE
4+
```c
5+
/**
6+
* Describe what method does
7+
*
8+
* @param paramName its meaning
9+
* @param paramName2 its meaning
10+
* @throw exception and situations it would be thrown
11+
* @see anotherClassOrMethod they need to reference
12+
* @return returnDataType describe what will returned
13+
**/
14+
```
15+
16+
Example:
17+
```c
18+
/**
19+
* A test class. A more elaborate class description.
20+
*/
21+
class Javadoc_Test
22+
{
23+
public:
24+
/**
25+
* An enum.
26+
* More detailed enum description.
27+
*/
28+
enum TEnum {
29+
TVal1, /**< enum value TVal1. */
30+
TVal2, /**< enum value TVal2. */
31+
TVal3 /**< enum value TVal3. */
32+
}
33+
*enumPtr, /**< enum pointer. Details. */
34+
enumVar; /**< enum variable. Details. */
35+
36+
/**
37+
* A constructor.
38+
* A more elaborate description of the constructor.
39+
*/
40+
Javadoc_Test();
41+
42+
/**
43+
* A destructor.
44+
* A more elaborate description of the destructor.
45+
*/
46+
~Javadoc_Test();
47+
48+
/**
49+
* a normal member taking two arguments and returning an integer value.
50+
*
51+
* @param a an integer argument.
52+
* @param s a constant character pointer.
53+
* @see Javadoc_Test()
54+
* @see ~Javadoc_Test()
55+
* @see testMeToo()
56+
* @see publicVar()
57+
* @return int The test results
58+
*/
59+
int testMe(int a,const char *s);
60+
61+
/**
62+
* A pure virtual member.
63+
*
64+
* @see testMe()
65+
* @param c1 the first argument.
66+
* @param c2 the second argument.
67+
* @throw IllegalArgumentException if c1 is uppercase
68+
*/
69+
virtual void testMeToo(char c1,char c2) = 0;
70+
71+
/**
72+
* a public variable.
73+
* Details.
74+
*/
75+
int publicVar;
76+
77+
/**
78+
* a function variable.
79+
* Details.
80+
*/
81+
int (*handler)(int a,int b);
82+
};
83+
84+
```
85+
386
##### SHOULD (Test case name must be named in camel syntax)
487
```c
588
TEST(General, DistributionCountingSort) {

java/lang/Double/Double.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define JAVA_LANG_DOUBLE_HPP_
2929

3030
#include "../Number/Number.hpp"
31+
#include "../String/String.hpp"
3132

3233
#ifdef WIN32
3334
#define unsigned_long_long unsigned __int64
@@ -110,7 +111,7 @@ static constexpr double initMinNormalDouble () noexcept {
110111
namespace Java {
111112
namespace Lang {
112113
class Double : public Number {
113-
private:
114+
private:
114115
double original;
115116
string originalString;
116117
public:

java/lang/Float/Float.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define JAVA_LANG_FLOAT_HPP_
2929

3030
#include "../Number/Number.hpp"
31+
#include "../String/String.hpp"
3132

3233
/**
3334
* A constant holding the positive infinity of type

java/lang/Integer/Integer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define JAVA_LANG_INTEGER_HPP_
2929

3030
#include "../Number/Number.hpp"
31+
#include "../String/String.hpp"
3132
#include "../Comparable/Comparable.hpp"
3233
#include <iostream>
3334
#include <bitset>

java/lang/Number/Number.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#define JAVA_LANG_NUMBER_HPP_
3131

3232
#include "../Object/Object.hpp"
33-
#include "../String/String.hpp"
3433

3534
namespace Java {
3635
namespace Lang {

java/lang/Short/Short.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define JAVA_LANG_SHORT_SHORT_HPP_
2929

3030
#include "../Number/Number.hpp"
31+
#include "../String/String.hpp"
3132

3233
namespace Java {
3334
namespace Lang {

0 commit comments

Comments
 (0)