Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
Simn committed Jan 12, 2015
1 parent e5216d2 commit 0aca833
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions genxml.ml
Expand Up @@ -110,8 +110,7 @@ let rec gen_type ?(values=None) t =
let e = PMap.find n values in
has_value := true;
let s = Ast.s_expr e in
(* the XML parser has issues otherwise *)
String.concat "'" (ExtString.String.nsplit s "\"")
s
with Not_found ->
""
) args in
Expand Down
2 changes: 1 addition & 1 deletion std/haxe/xml/Parser.hx
Expand Up @@ -329,7 +329,7 @@ class Parser
}
start = p + 1;
state = escapeNext;
} else if (!isValidChar(c)) {
} else if (!isValidChar(c) && c != "#".code) {
throw 'Invalid character in entity: ' + String.fromCharCode(c);
}
}
Expand Down
12 changes: 4 additions & 8 deletions tests/unit/src/unit/issues/Issue3725.hx
Expand Up @@ -5,8 +5,6 @@ class Issue3725 extends Test {

static function myStaticArgs(stringValue = "foo", intValue = 12, intHexValue = 0xFFFFFF, floatValue = 12.2223, boolValue = true) { }

#if !php

function testStaticArgs() {
var rtti = haxe.rtti.Rtti.getRtti(Issue3725);
var valueMap = new Map();
Expand All @@ -21,7 +19,7 @@ class Issue3725 extends Test {
}
}
}
eq("'foo'", valueMap["stringValue"]);
eq('"foo"', valueMap["stringValue"]);
eq("12", valueMap["intValue"]);
eq("0xFFFFFF", valueMap["intHexValue"]);
eq("12.2223", valueMap["floatValue"]);
Expand All @@ -40,7 +38,7 @@ class Issue3725 extends Test {
for (cf in rtti.statics) {
valueMap[cf.name] = cf.expr;
}
eq("'foo'", valueMap["stringValue"]);
eq('"foo"', valueMap["stringValue"]);
eq("12", valueMap["intValue"]);
eq("0xFFFFFF", valueMap["intHexValue"]);
eq("12.2223", valueMap["floatValue"]);
Expand All @@ -63,7 +61,7 @@ class Issue3725 extends Test {
}
}
}
eq("'foo'", valueMap["stringValue"]);
eq('"foo"', valueMap["stringValue"]);
eq("12", valueMap["intValue"]);
eq("0xFFFFFF", valueMap["intHexValue"]);
eq("12.2223", valueMap["floatValue"]);
Expand All @@ -82,12 +80,10 @@ class Issue3725 extends Test {
for (cf in rtti.fields) {
valueMap[cf.name] = cf.expr;
}
eq("'foo'", valueMap["stringValueM"]);
eq('"foo"', valueMap["stringValueM"]);
eq("12", valueMap["intValueM"]);
eq("0xFFFFFF", valueMap["intHexValueM"]);
eq("12.2223", valueMap["floatValueM"]);
eq("true", valueMap["boolValueM"]);
}

#end
}

0 comments on commit 0aca833

Please sign in to comment.