Skip to content

Added operators for Java::Lang::String and Array#286

Merged
tiny-express merged 38 commits intodevelopmentfrom
task/build-operator-set,get-for-java.util.Arrays-and-java.lang.String
Oct 20, 2017
Merged

Added operators for Java::Lang::String and Array#286
tiny-express merged 38 commits intodevelopmentfrom
task/build-operator-set,get-for-java.util.Arrays-and-java.lang.String

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Oct 16, 2017

  • build operator [] (set, get) for java.util.Arrays
    Example:
    Array a = {1, 2, 4};
    a[2] = 3;
    assertEquals(3, a[2]);

  • build operator [] (set, get) java.lang.String
    Example:
    String a = "123";
    a[2] = 3;
    assertEquals('3', a[2]);

  • Reformat code Arrays.hpp, Object.hpp, String.cpp, String.hpp, StringTest.cpp

  • Refactor code Arrays.hpp using macro

minh1302 and others added 30 commits September 15, 2017 21:21
…on<void (Key , Value, Value&)> mappingFunction)
…tion<void (Key , Value, Value&)> mappingFunction)
@ghost ghost self-assigned this Oct 16, 2017
@ghost ghost requested review from TuanAnhNguyen69 and loint October 16, 2017 08:56
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 16, 2017

Codecov Report

Merging #286 into development will increase coverage by 0.01%.
The diff coverage is 99.1%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #286      +/-   ##
===============================================
+ Coverage         95.6%   95.61%   +0.01%     
===============================================
  Files              186      186              
  Lines            16541    16565      +24     
  Branches           268      270       +2     
===============================================
+ Hits             15814    15839      +25     
+ Misses             727      726       -1
Impacted Files Coverage Δ
java/util/Arrays/ArraysTest.cpp 100% <100%> (ø) ⬆️
java/lang/String/String.cpp 100% <100%> (ø) ⬆️
java/lang/String/String.hpp 96.89% <100%> (+0.04%) ⬆️
java/lang/String/StringTest.cpp 100% <100%> (ø) ⬆️
java/util/HashMap/HashMapTest.cpp 100% <100%> (ø) ⬆️
java/util/Arrays/Arrays.hpp 95.29% <95.29%> (-0.79%) ⬇️
java/lang/Object/Object.hpp 96.87% <96.77%> (ø) ⬆️
java/util/HashMap/HashMap.hpp 99.2% <99.2%> (+0.9%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9441c86...ab5ef35. Read the comment docs.

@ghost ghost added the review requested label Oct 16, 2017
Copy link
Copy Markdown
Contributor

@dthongvl dthongvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename variable to meaningful name.

}

// FIXME
// FIXME
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this or describe why you cant fix.

Copy link
Copy Markdown
Author

@ghost ghost Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I just reformat code style, maybe you should ask the author of that method first.

}

template<typename T, typename U>
static Array<T> copyOf(Array<U> u, int newLength, T newType) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename u

}

template<typename T>
static void fill0(Array<T> *a, int fromIndex, int toIndex, T val) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename variable

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, fixed.

@ghost ghost added fixed and removed review requested labels Oct 16, 2017
@loint loint changed the title Task/build operator set,get for java.util.arrays and java.lang.string Added operators for Java::Lang::String and Array Oct 17, 2017
@tiny-express tiny-express merged commit 21a3ecb into development Oct 20, 2017
@tiny-express tiny-express deleted the task/build-operator-set,get-for-java.util.Arrays-and-java.lang.String branch October 20, 2017 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants