aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ic
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-01-24 16:26:56 +0100
committerSverker Eriksson <[email protected]>2013-01-24 16:26:56 +0100
commit1919bb75f74db7f7c36ab5237cfa5d5371e047df (patch)
tree3128146f81a0bc4951fbe5f898acc41a3495a6b6 /lib/ic
parentdbe123595470b7210b89db2b513e3482c987ed41 (diff)
downloadotp-1919bb75f74db7f7c36ab5237cfa5d5371e047df.tar.gz
otp-1919bb75f74db7f7c36ab5237cfa5d5371e047df.tar.bz2
otp-1919bb75f74db7f7c36ab5237cfa5d5371e047df.zip
ic: Making tests pass after changes in erl_interface and jinterface
Note that all these changes was needed due to violations of the APIs in erl_interface and jinterface. One might of course argue that these violations was made due to shortages in erl_interface and jinterface.
Diffstat (limited to 'lib/ic')
-rw-r--r--lib/ic/c_src/ic.c1
-rw-r--r--lib/ic/java_src/com/ericsson/otp/ic/Any.java2
-rw-r--r--lib/ic/java_src/com/ericsson/otp/ic/Environment.java4
-rw-r--r--lib/ic/java_src/com/ericsson/otp/ic/Term.java5
-rw-r--r--lib/ic/java_src/com/ericsson/otp/ic/TermHelper.java2
-rw-r--r--lib/ic/java_src/com/ericsson/otp/ic/TypeCode.java7
-rw-r--r--lib/ic/test/c_client_erl_server_SUITE_data/c_client.c8
-rw-r--r--lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c8
-rw-r--r--lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/c_client.c8
-rw-r--r--lib/ic/test/erl_client_c_server_SUITE_data/callbacks.c5
-rw-r--r--lib/ic/test/erl_client_c_server_proto_SUITE_data/callbacks.c5
11 files changed, 45 insertions, 10 deletions
diff --git a/lib/ic/c_src/ic.c b/lib/ic/c_src/ic.c
index 1ace9ea1af..796842f4f8 100644
--- a/lib/ic/c_src/ic.c
+++ b/lib/ic/c_src/ic.c
@@ -149,6 +149,7 @@ void ic_init_ref(CORBA_Environment *env, erlang_ref *ref)
{
strcpy(ref->node, erl_thisnodename());
+ ref->node_org_enc = ERLANG_LATIN1;
ref->len = 3;
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Any.java b/lib/ic/java_src/com/ericsson/otp/ic/Any.java
index 7337241908..c7ab6bad84 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/Any.java
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Any.java
@@ -417,6 +417,8 @@ public class Any {
switch (__tag) {
case (com.ericsson.otp.erlang.OtpExternal.atomTag):
+ case (com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag):
+ case (com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag):
java.lang.String __elabel = _is.read_atom(); // Enumerant or Boolean
os.write_atom(__elabel);
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Environment.java b/lib/ic/java_src/com/ericsson/otp/ic/Environment.java
index f0c66f0726..4c5315ee98 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/Environment.java
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Environment.java
@@ -334,6 +334,8 @@ public class Environment {
switch (tag) {
case com.ericsson.otp.erlang.OtpExternal.atomTag:
+ case com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag:
+ case com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag:
operation = is.read_atom();
break;
default:
@@ -344,6 +346,8 @@ public class Environment {
tag = is.peek();
switch (tag) {
case com.ericsson.otp.erlang.OtpExternal.atomTag:
+ case com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag:
+ case com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag:
operation = is.read_atom();
break;
default:
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Term.java b/lib/ic/java_src/com/ericsson/otp/ic/Term.java
index 9219cb7038..611f1f04d7 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/Term.java
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Term.java
@@ -57,7 +57,10 @@ final public class Term extends Any {
public boolean isAtom() {
if (ObjV == null) {
- if (tag == com.ericsson.otp.erlang.OtpExternal.atomTag)
+ if (tag == com.ericsson.otp.erlang.OtpExternal.atomTag ||
+ tag == com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag ||
+ tag == com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag)
+
return true;
return false;
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/TermHelper.java b/lib/ic/java_src/com/ericsson/otp/ic/TermHelper.java
index 437d38743b..5675eee706 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/TermHelper.java
+++ b/lib/ic/java_src/com/ericsson/otp/ic/TermHelper.java
@@ -69,6 +69,8 @@ public class TermHelper {
break;
case com.ericsson.otp.erlang.OtpExternal.atomTag:
+ case com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag:
+ case com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag:
_in.reset();
_value.atomV = _in.read_atom();
break;
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/TypeCode.java b/lib/ic/java_src/com/ericsson/otp/ic/TypeCode.java
index 6d049f75f7..327864320f 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/TypeCode.java
+++ b/lib/ic/java_src/com/ericsson/otp/ic/TypeCode.java
@@ -723,6 +723,8 @@ public class TypeCode {
switch(__tag) {
case (com.ericsson.otp.erlang.OtpExternal.atomTag):
+ case (com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag):
+ case (com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag):
__kind = TypeCode.kind(_is.read_atom());
switch(__kind.value()) {
@@ -757,6 +759,8 @@ public class TypeCode {
switch(__tag) {
case (com.ericsson.otp.erlang.OtpExternal.atomTag):
+ case (com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag):
+ case (com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag):
__kind = TypeCode.kind(_is.read_atom());
_tc = new TypeCode();
@@ -814,6 +818,9 @@ public class TypeCode {
__label.insert_string(__enum);
break;
case (com.ericsson.otp.erlang.OtpExternal.atomTag):
+ case (com.ericsson.otp.erlang.OtpExternal.atomUtf8Tag):
+ case (com.ericsson.otp.erlang.OtpExternal.smallAtomUtf8Tag):
+
java.lang.String __default = _is.read_atom();
__label.insert_atom(__default);
break;
diff --git a/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c b/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c
index e4f9cfdece..98fcdcc60f 100644
--- a/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c
+++ b/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c
@@ -390,6 +390,7 @@ int main(int argc, char **argv)
env->_from_pid = &pid;
strcpy(pid.node, this_node);
+ pid.node_org_enc = ERLANG_LATIN1;
pid.num = fd;
pid.serial = 0;
pid.creation = 0;
@@ -1006,7 +1007,7 @@ static int string4_test(IC_Env *env)
static int pid_test(IC_Env *env)
{
- erlang_pid pid = {"", 7, 0, 0}, pido, pidr;
+ erlang_pid pid = {"", ERLANG_LATIN1, 7, 0, 0}, pido, pidr;
strcpy(pid.node, this_node), /* this currently running node */
fprintf(stdout, "\n======== m_i_pid test ======\n\n");
@@ -1030,7 +1031,7 @@ static int pid_test(IC_Env *env)
static int port_test(IC_Env *env)
{
- erlang_port porti = {"node", 5, 1}, porto, portr;
+ erlang_port porti = {"node", ERLANG_LATIN1, 5, 1}, porto, portr;
fprintf(stdout, "\n======== m_i_port test ======\n\n");
portr = m_i_port_test(NULL, &porti, &porto, env);
@@ -1053,7 +1054,7 @@ static int port_test(IC_Env *env)
static int ref_test(IC_Env *env)
{
- erlang_ref refi = { "node1", 3, {1, 2, 3}, 1},
+ erlang_ref refi = { "node1", ERLANG_UTF8, 3, {1, 2, 3}, 1},
refo, refr;
fprintf(stdout, "\n======== m_i_ref test ======\n\n");
@@ -1111,6 +1112,7 @@ static int typedef_test(IC_Env *env)
long tl;
strcpy(mbi.node,"node");
+ mbi.node_org_enc = ERLANG_LATIN1;
mbi.id = 15;
mbi.creation = 1;
diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c b/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c
index f352b91fd5..4ced4fb5e5 100644
--- a/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c
+++ b/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c
@@ -393,6 +393,7 @@ int main(int argc, char **argv)
env->_from_pid = &pid;
strcpy(pid.node, this_node);
+ pid.node_org_enc = ERLANG_LATIN1;
pid.num = fd;
pid.serial = 0;
pid.creation = 0;
@@ -1009,7 +1010,7 @@ static int string4_test(IC_Env *env)
static int pid_test(IC_Env *env)
{
- erlang_pid pid = {"", 7, 0, 0}, pido, pidr;
+ erlang_pid pid = {"", ERLANG_LATIN1, 7, 0, 0}, pido, pidr;
strcpy(pid.node, this_node), /* this currently running node */
fprintf(stdout, "\n======== m_i_pid test ======\n\n");
@@ -1033,7 +1034,7 @@ static int pid_test(IC_Env *env)
static int port_test(IC_Env *env)
{
- erlang_port porti = {"node", 5, 1}, porto, portr;
+ erlang_port porti = {"node", ERLANG_LATIN1, 5, 1}, porto, portr;
fprintf(stdout, "\n======== m_i_port test ======\n\n");
portr = m_i_port_test(NULL, &porti, &porto, env);
@@ -1056,7 +1057,7 @@ static int port_test(IC_Env *env)
static int ref_test(IC_Env *env)
{
- erlang_ref refi = { "node1", 3, {1, 2, 3}, 1},
+ erlang_ref refi = { "node1", ERLANG_LATIN1, 3, {1, 2, 3}, 1},
refo, refr;
fprintf(stdout, "\n======== m_i_ref test ======\n\n");
@@ -1114,6 +1115,7 @@ static int typedef_test(IC_Env *env)
long tl;
strcpy(mbi.node,"node");
+ mbi.node_org_enc = ERLANG_LATIN1;
mbi.id = 15;
mbi.creation = 1;
diff --git a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/c_client.c b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/c_client.c
index b2c5b0c836..7d5abcc376 100644
--- a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/c_client.c
+++ b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE_data/c_client.c
@@ -393,6 +393,7 @@ int main(int argc, char **argv)
env->_from_pid = &pid;
strcpy(pid.node, this_node);
+ pid.node_org_enc = ERLANG_LATIN1;
pid.num = fd;
pid.serial = 0;
pid.creation = 0;
@@ -1009,7 +1010,7 @@ static int string4_test(IC_Env *env)
static int pid_test(IC_Env *env)
{
- erlang_pid pid = {"", 7, 0, 0}, pido, pidr;
+ erlang_pid pid = {"", ERLANG_LATIN1, 7, 0, 0}, pido, pidr;
strcpy(pid.node, this_node), /* this currently running node */
fprintf(stdout, "\n======== m_i_pid test ======\n\n");
@@ -1033,7 +1034,7 @@ static int pid_test(IC_Env *env)
static int port_test(IC_Env *env)
{
- erlang_port porti = {"node", 5, 1}, porto, portr;
+ erlang_port porti = {"node", ERLANG_LATIN1, 5, 1}, porto, portr;
fprintf(stdout, "\n======== m_i_port test ======\n\n");
portr = m_i_port_test(NULL, &porti, &porto, env);
@@ -1056,7 +1057,7 @@ static int port_test(IC_Env *env)
static int ref_test(IC_Env *env)
{
- erlang_ref refi = { "node1", 3, {1, 2, 3}, 1},
+ erlang_ref refi = { "node1", ERLANG_LATIN1, 3, {1, 2, 3}, 1},
refo, refr;
fprintf(stdout, "\n======== m_i_ref test ======\n\n");
@@ -1114,6 +1115,7 @@ static int typedef_test(IC_Env *env)
long tl;
strcpy(mbi.node,"node");
+ mbi.node_org_enc = ERLANG_LATIN1;
mbi.id = 15;
mbi.creation = 1;
diff --git a/lib/ic/test/erl_client_c_server_SUITE_data/callbacks.c b/lib/ic/test/erl_client_c_server_SUITE_data/callbacks.c
index 305017ae85..ed21ba7baf 100644
--- a/lib/ic/test/erl_client_c_server_SUITE_data/callbacks.c
+++ b/lib/ic/test/erl_client_c_server_SUITE_data/callbacks.c
@@ -494,10 +494,12 @@ m_i_port_test__rs* m_i_port_test__cb(CORBA_Object oe_obj,
m_i_port_test__rs* rs = NULL;
strcpy((*a).node,(*b).node);
+ a->node_org_enc = b->node_org_enc;
(*a).id = (*b).id;
(*a).creation = 0;
strcpy((*c).node,(*b).node);
+ c->node_org_enc = b->node_org_enc;
(*c).id = (*b).id;
(*c).creation = 0;
return rs;
@@ -514,6 +516,7 @@ m_i_ref_test__rs* m_i_ref_test__cb(CORBA_Object oe_obj,
m_i_ref_test__rs* rs = NULL;
strcpy((*a).node,(*b).node);
+ a->node_org_enc = b->node_org_enc;
/*(*a).id = (*b).id;*/
(*a).len = (*b).len;
(*a).n[0] = (*b).n[0];
@@ -522,6 +525,7 @@ m_i_ref_test__rs* m_i_ref_test__cb(CORBA_Object oe_obj,
(*a).creation = 0;
strcpy((*c).node,(*b).node);
+ c->node_org_enc = b->node_org_enc;
/*(*c).id = (*b).id;*/
(*c).len = (*b).len;
(*c).n[0] = (*b).n[0];
@@ -557,6 +561,7 @@ m_i_typedef_test__rs* m_i_typedef_test__cb(CORBA_Object oe_obj,
*d = *b;
strcpy((*e).node,(*c).node);
+ e->node_org_enc = c->node_org_enc;
(*e).id = (*c).id;
(*e).creation = 0;
*a = 4711;
diff --git a/lib/ic/test/erl_client_c_server_proto_SUITE_data/callbacks.c b/lib/ic/test/erl_client_c_server_proto_SUITE_data/callbacks.c
index c423a9e51c..d813cae45a 100644
--- a/lib/ic/test/erl_client_c_server_proto_SUITE_data/callbacks.c
+++ b/lib/ic/test/erl_client_c_server_proto_SUITE_data/callbacks.c
@@ -494,10 +494,12 @@ m_i_port_test__rs* m_i_port_test__cb(CORBA_Object oe_obj,
m_i_port_test__rs* rs = NULL;
strcpy((*a).node,(*b).node);
+ a->node_org_enc = b->node_org_enc;
(*a).id = (*b).id;
(*a).creation = 0;
strcpy((*c).node,(*b).node);
+ c->node_org_enc = b->node_org_enc;
(*c).id = (*b).id;
(*c).creation = 0;
return rs;
@@ -514,6 +516,7 @@ m_i_ref_test__rs* m_i_ref_test__cb(CORBA_Object oe_obj,
m_i_ref_test__rs* rs = NULL;
strcpy((*a).node,(*b).node);
+ a->node_org_enc = b->node_org_enc;
/*(*a).id = (*b).id;*/
(*a).len = (*b).len;
(*a).n[0] = (*b).n[0];
@@ -522,6 +525,7 @@ m_i_ref_test__rs* m_i_ref_test__cb(CORBA_Object oe_obj,
(*a).creation = 0;
strcpy((*c).node,(*b).node);
+ c->node_org_enc = b->node_org_enc;
/*(*c).id = (*b).id;*/
(*c).len = (*b).len;
(*c).n[0] = (*b).n[0];
@@ -557,6 +561,7 @@ m_i_typedef_test__rs* m_i_typedef_test__cb(CORBA_Object oe_obj,
*d = *b;
strcpy((*e).node,(*c).node);
+ e->node_org_enc = c->node_org_enc;
(*e).id = (*c).id;
(*e).creation = 0;
*a = 4711;