Skip to content

Commit

Permalink
SONARJS-805 Add 3 more methods for Ember.js (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
vilchik-elena authored Nov 8, 2016
1 parent 44e9cf2 commit 0e2c19b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ <h2>Exceptions</h2>
<li> <code>classify</code> </li>
<li> <code>dasherize</code> </li>
<li> <code>decamelize</code> </li>
<li> <code>fmt</code> </li>
<li> <code>loc</code> </li>
<li> <code>underscore</code> </li>
<li> <code>w</code> </li>
</ul>

Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ function ember_api() {
"foo".classify();
"foo".dasherize();
"foo".decamelize();
"foo".fmt();
"foo".loc();
"foo".underscore();
"foo".w();
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ Map<String, SymbolicValue> getMethods() {
.put("classify", method(Constraint.STRING_PRIMITIVE))
.put("dasherize", method(Constraint.STRING_PRIMITIVE))
.put("decamelize", method(Constraint.STRING_PRIMITIVE))
.put("fmt", method(Constraint.STRING_PRIMITIVE))
.put("loc", method(Constraint.STRING_PRIMITIVE))
.put("underscore", method(Constraint.STRING_PRIMITIVE))
.put("w", method(Constraint.ARRAY))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void test_string() throws Exception {
public void test_ember_string_extension() throws Exception {
type = Type.STRING_PRIMITIVE;
assertMethod(value("camelize"), method(Constraint.STRING_PRIMITIVE));
assertMethod(value("w"), method(Constraint.ARRAY));
}

@Test
Expand Down

0 comments on commit 0e2c19b

Please sign in to comment.