make test_webidl robust to stack start locations
This commit is contained in:
Родитель
c702b43fda
Коммит
4c0ee8607b
|
@ -49,9 +49,10 @@ caught: a JSImplementation must implement all functions, you forgot Child2JS::vi
|
|||
|hello|43|world|41|
|
||||
12.35
|
||||
a returned string
|
||||
C string address: "string A" 0xa30
|
||||
C string address: "string B" 0xa40
|
||||
C string address: "string A" 0xa30
|
||||
C string addresses: "string A" ? "string A" => 0
|
||||
C string addresses: "string B" ? "string B" => 0
|
||||
C string addresses: "string A" ? "string B" => -1
|
||||
C string addresses: "string B" ? "string A" => 1
|
||||
10
|
||||
object
|
||||
10
|
||||
|
|
|
@ -104,9 +104,10 @@ suser.PrintFloat(12.3456);
|
|||
TheModule.print(suser.returnAString());
|
||||
|
||||
// Verify that subsequent calls with the same string value re-use the string storage.
|
||||
suser.PrintCStringAddress("string A");
|
||||
suser.PrintCStringAddress("string B");
|
||||
suser.PrintCStringAddress("string A");
|
||||
suser.CompareCStringAddress("string A", "string A");
|
||||
suser.CompareCStringAddress("string B", "string B");
|
||||
suser.CompareCStringAddress("string A", "string B");
|
||||
suser.CompareCStringAddress("string B", "string A");
|
||||
|
||||
var bv = new TheModule.RefUser(10);
|
||||
var bv2 = new TheModule.RefUser(11);
|
||||
|
|
|
@ -60,8 +60,8 @@ public:
|
|||
void PrintFloat(float f) { printf("%.2f\n", f); }
|
||||
const char* returnAString() { return "a returned string"; }
|
||||
|
||||
void PrintCStringAddress(const char* s) {
|
||||
printf("C string address: \"%s\" %p\n", s, s);
|
||||
void CompareCStringAddress(const char* s1, const char* s2) {
|
||||
printf("C string addresses: \"%s\" ? \"%s\" => %d\n", s1, s2, s1 < s2 ? -1 : (s1 == s2 ? 0 : 1));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ interface StringUser {
|
|||
void Print(long anotherInteger, DOMString anotherString);
|
||||
void PrintFloat(float f);
|
||||
[Const] DOMString returnAString();
|
||||
void PrintCStringAddress(DOMString str);
|
||||
void CompareCStringAddress(DOMString str1, DOMString str2);
|
||||
};
|
||||
|
||||
interface RefUser {
|
||||
|
|
Загрузка…
Ссылка в новой задаче