*not part of the buld*
blackConnect tests update git-svn-id: svn://10.0.0.236/trunk@99925 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -6,3 +6,4 @@ J2XIN
|
||||
J2XOUT
|
||||
J2XINOUT
|
||||
J2XRET
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
@@ -174,8 +174,8 @@ NS_IMETHODIMP J2XINServerTestComponentImpl::TestChar(char i) {
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestWChar(PRUnichar i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
*/
|
||||
} */
|
||||
|
||||
/* void TestString (in string i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestString(const char *i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",i);
|
||||
@@ -203,16 +203,16 @@ NS_IMETHODIMP J2XINServerTestComponentImpl::TestLongArray(PRUint32 count, PRInt3
|
||||
}
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count)] in char valueArray); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestCharArray(PRUint32 count, char *valueArray) {
|
||||
/*NS_IMETHODIMP J2XINServerTestComponentImpl::TestCharArray(PRUint32 count, char *valueArray) {
|
||||
return PrintResultArray("j2x.in.server.charArray",count,valueArray);;
|
||||
}
|
||||
} */
|
||||
|
||||
/* void TestMixed (in boolean bBool, in char cChar, in octet nByte, in short nShort, in unsigned short nUShort, in long nLong, in unsigned long nULong, in long long nHyper, in unsigned long long nUHyper, in float fFloat, in double fDouble, in string aString, in unsigned long count, [array, size_is (count)] in long longArray); */
|
||||
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestMixed(PRBool bBool,/* char cChar,*/ PRUint8 nByte, PRInt16 nShort, PRUint16 nUShort, PRInt32 nLong, PRUint32 nULong, PRInt64 nHyper, PRUint64 nUHyper, float fFloat, double fDouble, const char *aString, PRUint32 count, PRInt32 *longArray) {
|
||||
/*
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestMixed(PRBool bBool, char cChar, PRUint8 nByte, PRInt16 nShort, PRUint16 nUShort, PRInt32 nLong, PRUint32 nULong, PRInt64 nHyper, PRUint64 nUHyper, float fFloat, double fDouble, const char *aString, PRUint32 count, PRInt32 *longArray) {
|
||||
char cChar = '0';
|
||||
return PrintResultMixed("j2x.in.server.mixed",(PRBool)bBool,(char)cChar,(PRUint8)nByte,(PRInt16)nShort, (PRUint16)nUShort, (PRInt32)nLong, (PRUint32)nULong, (PRInt64)nHyper, (PRUint64)nUHyper, (float)fFloat, (double)fDouble, (char*)aString, (PRUint32)count, (PRInt32*)longArray);
|
||||
}
|
||||
} */
|
||||
|
||||
/* void TestObject (in iJ2XINServerTestComponent obj); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestObject(iJ2XINServerTestComponent *obj) {
|
||||
|
||||
@@ -25,19 +25,16 @@ DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XINServerTestComponent
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
XPIDL_MODULE = $(MODULE)
|
||||
IS_COMPONENT = 1
|
||||
|
||||
#It is not right !
|
||||
#DSO_LDOPTS += -L$(DIST)/lib \
|
||||
# -lnspr4 \
|
||||
# $(NULL)
|
||||
DSO_LDOPTS += \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
@@ -48,13 +45,13 @@ CPPSRCS = \
|
||||
J2XINServerTestComponent.cpp \
|
||||
J2XINServerTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = iJ2XINServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XINServerTestComponent.java
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
|
||||
@@ -39,19 +39,19 @@ interface iJ2XINServerTestComponent : nsISupports
|
||||
void TestDouble(in double i);
|
||||
void TestBoolean(in boolean i);
|
||||
// void TestChar(in char i);
|
||||
//void TestWChar(in wchar i);
|
||||
// void TestWChar(in wchar i);
|
||||
void TestString(in string i);
|
||||
void TestWString(in wstring i);
|
||||
void TestStringArray(in unsigned long count,[array, size_is(count)] in string valueArray);
|
||||
void TestLongArray(in unsigned long count, [array, size_is(count)] in long longArray);
|
||||
void TestCharArray(in unsigned long count,[array, size_is(count)] in char valueArray);
|
||||
void TestMixed(in boolean bBool,/*in char cChar*,*/ in octet nByte,
|
||||
in short nShort, in unsigned short nUShort,
|
||||
in long nLong, in unsigned long nULong,
|
||||
in long long nHyper, in unsigned long long nUHyper,
|
||||
in float fFloat, in double fDouble,
|
||||
in string aString,
|
||||
in unsigned long count, [array, size_is(count)] in long longArray);
|
||||
// void TestCharArray(in unsigned long count,[array, size_is(count)] in char valueArray);
|
||||
// void TestMixed(in boolean bBool,/*in char cChar*,*/ in octet nByte,
|
||||
// in short nShort, in unsigned short nUShort,
|
||||
// in long nLong, in unsigned long nULong,
|
||||
// in long long nHyper, in unsigned long long nUHyper,
|
||||
// in float fFloat, in double fDouble,
|
||||
// in string aString,
|
||||
// in unsigned long count, [array, size_is(count)] in long longArray);
|
||||
void TestObject(in iJ2XINServerTestComponent obj);
|
||||
string GetTestObjectString();
|
||||
void TestIID(in nsIIDRef iid);
|
||||
|
||||
@@ -68,12 +68,6 @@ public interface iJ2XINServerTestComponent extends nsISupports
|
||||
/* void TestLongArray (in unsigned long count, [array, size_is (count)] in long longArray); */
|
||||
public void testLongArray(int count, int[] longArray);
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count)] in char valueArray); */
|
||||
public void testCharArray(int count, char[] valueArray);
|
||||
|
||||
/* void TestMixed (in boolean bBool, in octet nByte, in short nShort, in unsigned short nUShort, in long nLong, in unsigned long nULong, in long long nHyper, in unsigned long long nUHyper, in float fFloat, in double fDouble, in string aString, in unsigned long count, [array, size_is (count)] in long longArray); */
|
||||
public void testMixed(boolean bBool, byte nByte, short nShort, short nUShort, int nLong, int nULong, long nHyper, long nUHyper, float fFloat, double fDouble, String aString, int count, int[] longArray);
|
||||
|
||||
/* void TestObject (in iJ2XINServerTestComponent obj); */
|
||||
public void testObject(iJ2XINServerTestComponent obj);
|
||||
|
||||
|
||||
@@ -43,19 +43,18 @@ CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XINServerTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
iJ2XINServerTestComponent.class : iJ2XINServerTestComponent.java
|
||||
$(JAVAC_PROG) $(JAVAC_FLAGS) iJ2XINServerTestComponent.java
|
||||
install:: $(DLL) iJ2XINServerTestComponent.class
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\J2XIN*.xpt
|
||||
del /f $(DIST)\bin\components\J2XINC*.xpt
|
||||
del /f $(DIST)\bin\components\J2XINS*.xpt
|
||||
|
||||
@@ -27,8 +27,7 @@ import java.io.DataOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iClientTestComponent, iJClientTestComponent,
|
||||
iExclusionSupport {
|
||||
public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iClientTestComponent, iJClientTestComponent, iExclusionSupport {
|
||||
private iJ2XINServerTestComponent server = null;
|
||||
private VarContainer varContainer = null;
|
||||
private String testLocation = null;
|
||||
@@ -105,7 +104,11 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
return;
|
||||
}
|
||||
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
/* if(!exclusionHash.containsKey("char"))
|
||||
testChar();
|
||||
if(!exclusionHash.containsKey("wchar"))
|
||||
testWChar();
|
||||
*/ if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
testLong();
|
||||
@@ -133,12 +136,12 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
testStringArray();
|
||||
if(!exclusionHash.containsKey("longArray"))
|
||||
testLongArray();
|
||||
if(!exclusionHash.containsKey("charArray"))
|
||||
testCharArray();
|
||||
// if(!exclusionHash.containsKey("charArray"))
|
||||
// testCharArray();
|
||||
if(!exclusionHash.containsKey("object"))
|
||||
testObject();
|
||||
if(!exclusionHash.containsKey("mixed"))
|
||||
testMixed();
|
||||
// if(!exclusionHash.containsKey("mixed"))
|
||||
// testMixed();
|
||||
if(!exclusionHash.containsKey("iid"))
|
||||
testIID();
|
||||
if(!exclusionHash.containsKey("cid"))
|
||||
@@ -264,23 +267,45 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
printResult("true\nfalse","j2x.in.client.boolean");
|
||||
server.flush("boolean");
|
||||
}
|
||||
|
||||
// private void testChar() {
|
||||
/*
|
||||
private void testChar() {
|
||||
// server.testChar('S');
|
||||
// server.testWChar(VarContainer.charVar);
|
||||
// printResult("S","j2x.in.client.char");
|
||||
// server.flush("char");
|
||||
// }
|
||||
server.testChar(VarContainer.charVar);
|
||||
printResult((new Character(VarContainer.charVar)).toString(),"j2x.in.client.char");
|
||||
server.flush("char");
|
||||
}
|
||||
|
||||
private void testWChar() {
|
||||
// server.testWChar('S');
|
||||
server.testWChar(VarContainer.charVar);
|
||||
printResult((new Character(VarContainer.charVar)).toString(),"j2x.in.client.wchar");
|
||||
server.flush("wchar");
|
||||
}
|
||||
*/
|
||||
private void testString() {
|
||||
printResult(VarContainer.charPVar,"j2x.in.client.string");
|
||||
buf = new StringBuffer("");
|
||||
buf.append(VarContainer.charPVar+"\n");
|
||||
server.testString(VarContainer.charPVar);
|
||||
buf.append(VarContainer.charPVar2+"\n");
|
||||
server.testString(VarContainer.charPVar2);
|
||||
buf.append(VarContainer.charPVar3+"\n");
|
||||
server.testString(VarContainer.charPVar3);
|
||||
|
||||
printResult(buf.toString(),"j2x.in.client.string");
|
||||
server.flush("string");
|
||||
}
|
||||
|
||||
private void testWString() {
|
||||
printResult(VarContainer.unicharPVar,"j2x.in.client.wstring");
|
||||
buf = new StringBuffer("");
|
||||
|
||||
buf.append(VarContainer.unicharPVar+"\n");
|
||||
server.testWString(VarContainer.unicharPVar);
|
||||
buf.append(VarContainer.unicharPVar2+"\n");
|
||||
server.testWString(VarContainer.unicharPVar2);
|
||||
buf.append(VarContainer.unicharPVar3+"\n");
|
||||
server.testWString(VarContainer.unicharPVar3);
|
||||
|
||||
printResult(buf.toString(),"j2x.in.client.wstring");
|
||||
server.flush("wstring");
|
||||
}
|
||||
|
||||
@@ -304,7 +329,7 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
printResult(s.toString(),"j2x.in.client.longArray");
|
||||
server.testLongArray(intArray.length, intArray);
|
||||
}
|
||||
|
||||
/*
|
||||
private void testCharArray() {
|
||||
char[] charArray = {'A','B','c','L','ï','u','Ô','p'};
|
||||
s = new StringBuffer();
|
||||
@@ -349,7 +374,7 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
printResult(s.toString(),"j2x.in.client.mixed");
|
||||
server.testMixed(bBool, nByte, nShort, nUShort,nLong,nULong, nHyper, nUHyper, fFloat,fDouble, aString, intArray.length, intArray);
|
||||
}
|
||||
|
||||
*/
|
||||
private void testObject() {
|
||||
printResult(server.getTestObjectString(),"j2x.in.client.object");
|
||||
server.testObject(server);
|
||||
@@ -358,7 +383,7 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
private void testIID() {
|
||||
buf = new StringBuffer("");
|
||||
IID iid=new IID("cc7480e0-3a37-11d5-b653-005004552ed1");
|
||||
buf.append(iid + "\n");
|
||||
buf.append(iid.getString() + "\n");
|
||||
|
||||
server.testIID(iid);
|
||||
printResult(buf.toString(),"j2x.in.client.iid");
|
||||
@@ -368,7 +393,7 @@ public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iCli
|
||||
private void testCID() {
|
||||
buf = new StringBuffer("");
|
||||
CID cid=new CID("cc7480e0-3a37-11d5-b653-005004552ed1");
|
||||
buf.append(cid + "\n");
|
||||
buf.append(cid.getString() + "\n");
|
||||
|
||||
server.testCID(cid);
|
||||
printResult(buf.toString(),"j2x.in.client.cid");
|
||||
|
||||
@@ -30,28 +30,35 @@ JAVA_OR_NSJVM=1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XINClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XINClientTestComponent.java
|
||||
J2XINClientTestComponent.jar.comp: manifest javai J2XINClientTestComponent.class
|
||||
#JAVAI_SRC = \
|
||||
# iJ2XINClientTestComponent.java
|
||||
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
J2XINClientTestComponent.jar.comp: manifest J2XINClientTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm J2XINClientTestComponent.jar.comp manifest *.class
|
||||
|
||||
J2XINClientTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
#javai::
|
||||
# $(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
|
||||
install-component: J2XINClientTestComponent.jar.comp J2XINClientTestComponent.jar.info
|
||||
cp -f J2XINClientTestComponent.jar* $(DIST)/bin/components
|
||||
|
||||
clobber::
|
||||
rm -f *.class *.jar.comp
|
||||
rm -f $(DIST)/bin/components/J2XINClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
rm -f $(DIST)/../classes/J2XINClientTestComponent.class
|
||||
|
||||
@@ -38,13 +38,19 @@ XPIDLSRCS = \
|
||||
.\iJ2XINClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XINClientTestComponent.java\
|
||||
$(NULL)
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
J2XINClientTestComponent.class: J2XINClientTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes iJ2XINClientTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes J2XINClientTestComponent.java
|
||||
J2XINClientTestComponent.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes $(JAVA_SRC)
|
||||
|
||||
J2XINClientTestComponent.jar.comp: manifest J2XINClientTestComponent.class
|
||||
$(JDKHOME)\bin\jar cvfm J2XINClientTestComponent.jar.comp manifest *.class
|
||||
@@ -55,9 +61,7 @@ install-component: J2XINClientTestComponent.jar.comp J2XINClientTestComponent.ja
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\J2XINClientTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XINServerTestComponent.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XINClientTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
|
||||
-del /f $(DIST)\..\classes\J2XINClientTestComponent.class
|
||||
|
||||
@@ -28,8 +28,8 @@ VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* fBuffer=NULL;
|
||||
char* fBuffer;
|
||||
PRUint8 end_of_data = 112;
|
||||
int all=0;
|
||||
|
||||
@@ -49,7 +49,8 @@ J2XINOUTServerTestComponentImpl::J2XINOUTServerTestComponentImpl()
|
||||
fprintf(stderr,"ERROR: %s or %s isn't set !", BC_TEST_LOCATION_VAR_NAME, BC_LOG_LOCATION_VAR_NAME);
|
||||
}
|
||||
InitStackVars();
|
||||
printf("DEbug:avm:J2XINOUTServerTestComponentImpl::J2XINOUTServerTestComponentImp\n");
|
||||
// fBuffer=(char*)PR_Malloc(sizeof(char*));
|
||||
// printf("DEbug:avm:J2XINOUTServerTestComponentImpl::J2XINOUTServerTestComponentImp\n");
|
||||
}
|
||||
|
||||
J2XINOUTServerTestComponentImpl::~J2XINOUTServerTestComponentImpl()
|
||||
@@ -67,32 +68,38 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::GetTestLocation(char **tLocation,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::Flush(const char *type) {
|
||||
char* fileName = NULL;
|
||||
|
||||
char* fileName = NULL;//(char*)PR_Malloc(sizeof(char*));
|
||||
fileName = PR_sprintf_append(fileName,"j2x.inout.server.%s",type);
|
||||
if(fBuffer) {
|
||||
PrintResult(fileName,fBuffer);
|
||||
PR_smprintf_free(fBuffer);
|
||||
fBuffer = NULL;
|
||||
} else {
|
||||
}
|
||||
PR_smprintf_free(fileName);
|
||||
|
||||
if(fBuffer != NULL ) {
|
||||
}else {
|
||||
}
|
||||
PR_smprintf_free(fBuffer);
|
||||
fBuffer = NULL;
|
||||
PR_smprintf_free(fileName);
|
||||
all=0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//Test methods
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestChar(char *i) {
|
||||
if (*i!='x') fBuffer = PR_sprintf_append(fBuffer,"%c\n",*i);
|
||||
else Flush("char");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestWChar(PRUnichar *i) {
|
||||
if (*i!='x') fBuffer = PR_sprintf_append(fBuffer,"%c\n",*i);
|
||||
else Flush("wchar");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//Test methods
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestShort(PRInt16 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%hd\n",*i);
|
||||
else Flush("short");
|
||||
return NS_OK;
|
||||
|
||||
@@ -100,7 +107,8 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestShort(PRInt16 *i) {
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLong(PRInt32 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
//fprintf(stderr,"L==%ld\n",*i);
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%ld\n",*i);
|
||||
else Flush("long");
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -114,23 +122,22 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLonglong(PRInt64 *i) {
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestByte(PRUint8 *i) {
|
||||
// Strange bug here
|
||||
/* if (*i!=112)*/ fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
all++;
|
||||
if (all==4) Flush("octet");
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
else Flush("octet");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestUShort(PRUint16 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
//fprintf(stderr,"S==%hu\n",*i);
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%hu\n",*i);
|
||||
else Flush("ushort");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestULong(PRUint32 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%lu\n",*i);
|
||||
else Flush("ulong");
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -138,7 +145,7 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestULong(PRUint32 *i) {
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestULonglong(PRUint64 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%lld\n",*i);
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%llu\n",*i);
|
||||
else Flush("ulonglong");
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -168,28 +175,13 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestBoolean(PRBool *i) {
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestChar(char *i) {
|
||||
// Strange bug here
|
||||
/* if (*i!='x')*/ fBuffer = PR_sprintf_append(fBuffer,"%c\n",i);
|
||||
all++;
|
||||
if (all==2) Flush("char");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestWChar(PRUnichar *i) {
|
||||
// Strange bug here
|
||||
/* if (*i!='x')*/ fBuffer = PR_sprintf_append(fBuffer,"%c\n",i);
|
||||
all++;
|
||||
if (all==2) Flush("wchar");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestString(char **i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",*i);
|
||||
all++;
|
||||
if (all==3) Flush("string");
|
||||
//fprintf(stderr,"==>%d\n",PL_strcmp(*i,"112"));
|
||||
if (0!=PL_strcmp(*i,"112")) fBuffer = PR_sprintf_append(fBuffer,"%s\n",*i);
|
||||
else {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",*i);
|
||||
Flush("string");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -218,7 +210,7 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestStringArray(PRUint32 count, c
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLongArray(PRUint32 count, PRInt32 **longArray) {
|
||||
for(int i=0;i<count;i++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",longArray[i]);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",longArray[0][i]);
|
||||
Flush("longArray");
|
||||
return NS_OK;//PrintResultArray("j2x.in.server.longArray",count,longArray);
|
||||
}
|
||||
@@ -226,25 +218,24 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLongArray(PRUint32 count, PRI
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestCharArray(PRUint32 count, char **valueArray) {
|
||||
for(int i=0;i<count;i++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",valueArray[i]);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",valueArray[0][i]);
|
||||
Flush("charArray");
|
||||
return NS_OK;//PrintResultArray("j2x.in.server.charArray",count,valueArray);;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestMixed(PRBool *bBool, char *cChar, PRUint8 *nByte, PRInt16 *nShort, PRUint16 *nUShort, PRInt32 *nLong, PRUint32 *nULong, PRInt64 *nHyper, PRUint64 *nUHyper, float *fFloat, double *fDouble, char **aString, PRUint32 count, PRInt32 **longArray) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n%d\n%d",nByte, nShort, nUShort);
|
||||
Flush("mixed");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestObject(iJ2XINOUTServerTestComponent **obj) {
|
||||
obj[0]->TestObj();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestMixed(char *cChar, PRUint8 *nByte, PRInt16 *nShort, PRUint16 *nUShort, PRInt32 *nLong, PRUint32 *nULong, PRInt64 *nHyper, PRUint64 *nUHyper, char **aString) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n%d\n%hd\n%hu\n%ld\n%lu\n%lld\n%llu\n%s\n",*cChar,*nByte, *nShort, *nUShort, *nLong, *nULong, *nHyper, *nUHyper, *aString);
|
||||
Flush("mixed");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestObj() {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"!!!Right string!!!");
|
||||
Flush("object");
|
||||
@@ -265,6 +256,5 @@ NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestObj2() {
|
||||
}
|
||||
PR_smprintf_free(fileName);
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,10 @@ DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XINOUTServerTestComponent
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
@@ -51,11 +52,16 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XINOUTServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XINOUTServerTestComponent.java
|
||||
#JAVAI = iJ2XINOUTServerTestComponent.java
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
#JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
#export::
|
||||
# $(JAVAC) $(JAVAI)
|
||||
|
||||
@@ -28,6 +28,8 @@ interface iJ2XINOUTServerTestComponent : nsISupports
|
||||
{
|
||||
void GetTestLocation(out string tLocation, out string lLocation);
|
||||
void Flush(in string s);
|
||||
void TestChar(inout char i);
|
||||
void TestWChar(inout wchar i);
|
||||
void TestShort(inout short i);
|
||||
void TestLong(inout long i);
|
||||
void TestLonglong(inout long long i);
|
||||
@@ -38,22 +40,17 @@ interface iJ2XINOUTServerTestComponent : nsISupports
|
||||
void TestFloat(inout float i);
|
||||
void TestDouble(inout double i);
|
||||
void TestBoolean(inout boolean i);
|
||||
void TestChar(inout char i);
|
||||
void TestWChar(inout wchar i);
|
||||
void TestString(inout string i);
|
||||
void TestWString(inout wstring i);
|
||||
void TestStringArray(in unsigned long count,[array, size_is(count)] inout string valueArray);
|
||||
void TestLongArray(in unsigned long count, [array, size_is(count)] inout long longArray);
|
||||
void TestCharArray(in unsigned long count,[array, size_is(count)] inout char valueArray);
|
||||
void TestMixed(inout boolean bBool, inout char cChar, inout octet nByte,
|
||||
void TestObject(inout iJ2XINOUTServerTestComponent obj);
|
||||
void TestMixed(inout char cChar, inout octet nByte,
|
||||
inout short nShort, inout unsigned short nUShort,
|
||||
inout long nLong, inout unsigned long nULong,
|
||||
inout long long nHyper, inout unsigned long long nUHyper,
|
||||
inout float fFloat, inout double fDouble,
|
||||
inout string aString,
|
||||
in unsigned long count, [array, size_is(count)] inout long longArray);
|
||||
|
||||
void TestObject(inout iJ2XINOUTServerTestComponent obj);
|
||||
inout string aString);
|
||||
void TestObj();
|
||||
void TestObj2();
|
||||
};
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XINOUTServerTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XINOUTServerTestComponent
|
||||
*
|
||||
* IID: 0xc534e01c-9567-44ac-aaa6-f908fabefc2b
|
||||
*/
|
||||
|
||||
public interface iJ2XINOUTServerTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("c534e01c-9567-44ac-aaa6-f908fabefc2b");
|
||||
|
||||
|
||||
/* void GetTestLocation (out string tLocation, out string lLocation); */
|
||||
public void getTestLocation(String[] tLocation, String[] lLocation);
|
||||
|
||||
/* void Flush (in string s); */
|
||||
public void flush(String s);
|
||||
|
||||
/* void TestShort (inout short i); */
|
||||
public void testShort(short[] i);
|
||||
|
||||
/* void TestLong (inout long i); */
|
||||
public void testLong(int[] i);
|
||||
|
||||
/* void TestLonglong (inout long long i); */
|
||||
public void testLonglong(long[] i);
|
||||
|
||||
/* void TestByte (inout octet i); */
|
||||
public void testByte(byte[] i);
|
||||
|
||||
/* void TestUShort (inout unsigned short i); */
|
||||
public void testUShort(short[] i);
|
||||
|
||||
/* void TestULong (inout unsigned long i); */
|
||||
public void testULong(int[] i);
|
||||
|
||||
/* void TestULonglong (inout unsigned long long i); */
|
||||
public void testULonglong(long[] i);
|
||||
|
||||
/* void TestFloat (inout float i); */
|
||||
public void testFloat(float[] i);
|
||||
|
||||
/* void TestDouble (inout double i); */
|
||||
public void testDouble(double[] i);
|
||||
|
||||
/* void TestBoolean (inout boolean i); */
|
||||
public void testBoolean(boolean[] i);
|
||||
|
||||
/* void TestChar (inout char i); */
|
||||
public void testChar(char[] i);
|
||||
|
||||
/* void TestWChar (inout wchar i); */
|
||||
public void testWChar(char[] i);
|
||||
|
||||
/* void TestString (inout string i); */
|
||||
public void testString(String[] i);
|
||||
|
||||
/* void TestWString (inout wstring i); */
|
||||
public void testWString(String[] i);
|
||||
|
||||
/* void TestStringArray (in unsigned long count, [array, size_is (count)] inout string valueArray); */
|
||||
public void testStringArray(int count, String[][] valueArray);
|
||||
|
||||
/* void TestLongArray (in unsigned long count, [array, size_is (count)] inout long longArray); */
|
||||
public void testLongArray(int count, int[][] longArray);
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count)] inout char valueArray); */
|
||||
public void testCharArray(int count, char[][] valueArray);
|
||||
|
||||
/* void TestMixed (inout boolean bBool, inout char cChar, inout octet nByte, inout short nShort, inout unsigned short nUShort, inout long nLong, inout unsigned long nULong, inout long long nHyper, inout unsigned long long nUHyper, inout float fFloat, inout double fDouble, inout string aString, in unsigned long count, [array, size_is (count)] inout long longArray); */
|
||||
public void testMixed(boolean[] bBool, char[] cChar, byte[] nByte, short[] nShort, short[] nUShort, int[] nLong, int[] nULong, long[] nHyper, long[] nUHyper, float[] fFloat, double[] fDouble, String[] aString, int count, int[][] longArray);
|
||||
|
||||
/* void TestObject (inout iJ2XINOUTServerTestComponent obj); */
|
||||
public void testObject(iJ2XINOUTServerTestComponent[] obj);
|
||||
|
||||
/* void TestObj (); */
|
||||
public void testObj();
|
||||
|
||||
/* void TestObj2 (); */
|
||||
public void testObj2();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XINOUTServerTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XINOUTServerTestComponent
|
||||
*
|
||||
* IID: 0xc534e01c-9567-44ac-aaa6-f908fabefc2b
|
||||
*/
|
||||
|
||||
public interface iJ2XINOUTServerTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("c534e01c-9567-44ac-aaa6-f908fabefc2b");
|
||||
|
||||
|
||||
/* void GetTestLocation (out string tLocation, out string lLocation); */
|
||||
public void getTestLocation(String[] tLocation, String[] lLocation);
|
||||
|
||||
/* void Flush (in string s); */
|
||||
public void flush(String s);
|
||||
|
||||
/* void TestChar (inout char i); */
|
||||
public void testChar(char[] i);
|
||||
|
||||
/* void TestWChar (inout wchar i); */
|
||||
public void testWChar(char[] i);
|
||||
|
||||
/* void TestShort (inout short i); */
|
||||
public void testShort(short[] i);
|
||||
|
||||
/* void TestLong (inout long i); */
|
||||
public void testLong(int[] i);
|
||||
|
||||
/* void TestLonglong (inout long long i); */
|
||||
public void testLonglong(long[] i);
|
||||
|
||||
/* void TestByte (inout octet i); */
|
||||
public void testByte(byte[] i);
|
||||
|
||||
/* void TestUShort (inout unsigned short i); */
|
||||
public void testUShort(short[] i);
|
||||
|
||||
/* void TestULong (inout unsigned long i); */
|
||||
public void testULong(int[] i);
|
||||
|
||||
/* void TestULonglong (inout unsigned long long i); */
|
||||
public void testULonglong(long[] i);
|
||||
|
||||
/* void TestFloat (inout float i); */
|
||||
public void testFloat(float[] i);
|
||||
|
||||
/* void TestDouble (inout double i); */
|
||||
public void testDouble(double[] i);
|
||||
|
||||
/* void TestBoolean (inout boolean i); */
|
||||
public void testBoolean(boolean[] i);
|
||||
|
||||
/* void TestString (inout string i); */
|
||||
public void testString(String[] i);
|
||||
|
||||
/* void TestWString (inout wstring i); */
|
||||
public void testWString(String[] i);
|
||||
|
||||
/* void TestStringArray (in unsigned long count, [array, size_is (count)] inout string valueArray); */
|
||||
public void testStringArray(int count, String[][] valueArray);
|
||||
|
||||
/* void TestLongArray (in unsigned long count, [array, size_is (count)] inout long longArray); */
|
||||
public void testLongArray(int count, int[][] longArray);
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count)] inout char valueArray); */
|
||||
public void testCharArray(int count, char[][] valueArray);
|
||||
|
||||
/* void TestObject (inout iJ2XINOUTServerTestComponent obj); */
|
||||
public void testObject(iJ2XINOUTServerTestComponent[] obj);
|
||||
|
||||
/* void TestMixed (inout char cChar, inout octet nByte, inout short nShort, inout unsigned short nUShort, inout long nLong, inout unsigned long nULong, inout long long nHyper, inout unsigned long long nUHyper, inout string aString); */
|
||||
public void testMixed(char[] cChar, byte[] nByte, short[] nShort, short[] nUShort, int[] nLong, int[] nULong, long[] nHyper, long[] nUHyper, String[] aString);
|
||||
|
||||
/* void TestObj (); */
|
||||
public void testObj();
|
||||
|
||||
/* void TestObj2 (); */
|
||||
public void testObj2();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,10 @@ DLLNAME = J2XINOUTServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XINOUTServerTestComponent
|
||||
COMPONENT = 1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XINOUTServerTestComponent.obj \
|
||||
@@ -37,15 +40,14 @@ CPP_OBJS= \
|
||||
|
||||
XPIDLSRCS = .\iJ2XINOUTServerTestComponent.idl
|
||||
|
||||
JAVAI= iJ2XINOUTServerTestComponent.java
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
|
||||
JAVAC=$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
@@ -53,6 +55,3 @@ clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\J2XINOUT*.xpt
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
|
||||
|
||||
@@ -99,6 +99,10 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
System.err.println("Server is not initialized!!!");
|
||||
return;
|
||||
}
|
||||
if(!exclusionHash.containsKey("char"))
|
||||
testChar();
|
||||
if(!exclusionHash.containsKey("wchar"))
|
||||
testWChar();
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
@@ -135,6 +139,50 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
testMixed();
|
||||
}
|
||||
|
||||
|
||||
private void testChar() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testChar");
|
||||
char[] charVar = new char[1];
|
||||
|
||||
charVar[0]='0';
|
||||
s.append(charVar[0]+"\n");
|
||||
server.testChar(charVar);
|
||||
s2.append(charVar[0]+"\n");
|
||||
charVar[0]='Z';
|
||||
s.append(charVar[0]+"\n");
|
||||
server.testChar(charVar);
|
||||
s2.append(charVar[0]+"\n");
|
||||
charVar[0]='x';
|
||||
server.testChar(charVar);
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.char");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.char");
|
||||
}
|
||||
|
||||
|
||||
private void testWChar() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testWChar");
|
||||
char[] wcharVar = new char[1];
|
||||
|
||||
wcharVar[0]='0';
|
||||
s.append(wcharVar[0]+"\n");
|
||||
server.testWChar(wcharVar);
|
||||
s2.append(wcharVar[0]+"\n");
|
||||
wcharVar[0]='Z';
|
||||
s.append(wcharVar[0]+"\n");
|
||||
server.testWChar(wcharVar);
|
||||
s2.append(wcharVar[0]+"\n");
|
||||
wcharVar[0]='x';
|
||||
server.testWChar(wcharVar);
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.wchar");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.wchar");
|
||||
}
|
||||
|
||||
private void testShort() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
@@ -176,7 +224,7 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
s2.append(intVar[0]+"\n");
|
||||
intVar[0]=1000;//VarContainer.intVar;
|
||||
intVar[0]=VarContainer.intVar;
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
s2.append(intVar[0]+"\n");
|
||||
@@ -225,19 +273,15 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
System.err.println("server.testByte");
|
||||
byte[] byteVar = new byte[1];
|
||||
|
||||
byteVar[0]=java.lang.Byte.MIN_VALUE;
|
||||
byteVar[0]=VarContainer.byteMin;
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
s2.append(byteVar[0]+"\n");
|
||||
byteVar[0]=0;
|
||||
byteVar[0]=VarContainer.byteMid;
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
s2.append(byteVar[0]+"\n");
|
||||
byteVar[0]=VarContainer.unsignedByteVar;
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
s2.append(byteVar[0]+"\n");
|
||||
byteVar[0]=java.lang.Byte.MAX_VALUE;
|
||||
byteVar[0]=VarContainer.byteMax;
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
s2.append(byteVar[0]+"\n");
|
||||
@@ -333,7 +377,7 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
s2.append(floatVar[0]+"\n");
|
||||
floatVar[0]=1000;//VarContainer.floatVar;
|
||||
floatVar[0]=VarContainer.floatVar;
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
s2.append(floatVar[0]+"\n");
|
||||
@@ -397,49 +441,6 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
}
|
||||
|
||||
|
||||
private void testChar() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testChar");
|
||||
char[] charVar = new char[1];
|
||||
|
||||
charVar[0]='0';
|
||||
s.append(charVar[0]+"\n");
|
||||
server.testChar(charVar);
|
||||
s2.append(charVar[0]+"\n");
|
||||
charVar[0]='Z';
|
||||
s.append(charVar[0]+"\n");
|
||||
server.testChar(charVar);
|
||||
s2.append(charVar[0]+"\n");
|
||||
charVar[0]='x';
|
||||
server.testChar(charVar);
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.char");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.char");
|
||||
}
|
||||
|
||||
|
||||
private void testWChar() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testWChar");
|
||||
char[] wcharVar = new char[1];
|
||||
|
||||
wcharVar[0]='0';
|
||||
s.append(wcharVar[0]+"\n");
|
||||
server.testWChar(wcharVar);
|
||||
s2.append(wcharVar[0]+"\n");
|
||||
wcharVar[0]='Z';
|
||||
s.append(wcharVar[0]+"\n");
|
||||
server.testWChar(wcharVar);
|
||||
s2.append(wcharVar[0]+"\n");
|
||||
// wcharVar[0]='x';
|
||||
// server.testWChar(wcharVar);
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.wchar");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.wchar");
|
||||
}
|
||||
|
||||
|
||||
private void testString() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
@@ -447,7 +448,7 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
System.err.println("server.testString");
|
||||
String[] stringVar = new String[1];
|
||||
|
||||
stringVar[0]="111";//VarContainer.charPVar;
|
||||
stringVar[0]=null;//VarContainer.charPVar;
|
||||
s.append(stringVar[0]+"\n");
|
||||
server.testString(stringVar);
|
||||
s2.append(stringVar[0]+"\n");
|
||||
@@ -455,19 +456,16 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
s.append(stringVar[0]+"\n");
|
||||
server.testString(stringVar);
|
||||
s2.append(stringVar[0]+"\n");
|
||||
stringVar[0]="NULL string";
|
||||
stringVar[0]="112";
|
||||
s.append(stringVar[0]+"\n");
|
||||
server.testString(stringVar);
|
||||
s2.append(stringVar[0]+"\n");
|
||||
// stringVar[0]="112";
|
||||
// server.testString(stringVar);
|
||||
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.string");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.string");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void testWString() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
@@ -482,12 +480,10 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
s.append(wstringVar[0]+"\n");
|
||||
server.testWString(wstringVar);
|
||||
s2.append(wstringVar[0]+"\n");
|
||||
wstringVar[0]="NULL string";
|
||||
wstringVar[0]=null;
|
||||
s.append(wstringVar[0]+"\n");
|
||||
server.testWString(wstringVar);
|
||||
s2.append(wstringVar[0]+"\n");
|
||||
// wstringVar[0]="112";
|
||||
// server.testWString(wstringVar);
|
||||
printResult(s.toString(),"j2x.inout.client.wstring");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.wstring");
|
||||
}
|
||||
@@ -555,6 +551,18 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
printResult(s.toString(),"j2x.inout.client.charArray");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.charArray");
|
||||
}
|
||||
|
||||
private void testObject() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testObject");
|
||||
iJ2XINOUTServerTestComponent[] objectVar= new iJ2XINOUTServerTestComponent[1];
|
||||
objectVar[0] = server;
|
||||
|
||||
printResult("!!!Right string!!!","j2x.inout.client.object"); //!!!Mat' Mat'
|
||||
server.testObject(objectVar);
|
||||
objectVar[0].testObj2();
|
||||
}
|
||||
|
||||
private void testMixed() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
@@ -569,12 +577,7 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
int[] uintVar=new int[1];
|
||||
char[] charVar=new char[1];
|
||||
long[] ulongVar=new long[1];
|
||||
float[] floatVar=new float[1];
|
||||
double[] doubleVar=new double[1];
|
||||
int count=3;
|
||||
String[] stringVar=new String[1];
|
||||
boolean[] boolVar=new boolean[1];
|
||||
int[][] intAVar=new int[1][3];
|
||||
|
||||
shortVar[0]=VarContainer.shortVar;
|
||||
intVar[0]=VarContainer.intVar;
|
||||
@@ -583,46 +586,26 @@ public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent
|
||||
ushortVar[0]=VarContainer.unsignedShortVar;
|
||||
uintVar[0]=VarContainer.unsignedIntVar;
|
||||
ulongVar[0]=VarContainer.unsignedLongVar;
|
||||
floatVar[0]=VarContainer.floatVar;
|
||||
doubleVar[0]=VarContainer.doubleVar;
|
||||
boolVar[0]=VarContainer.booleanVar;
|
||||
charVar[0]=VarContainer.charVar;
|
||||
stringVar[0]=VarContainer.charPVar;
|
||||
intAVar[0][0]=333;
|
||||
intAVar[0][1]=444;
|
||||
intAVar[0][2]=555;
|
||||
|
||||
s.append(boolVar[0]+"\n"+charVar[0]+"\n"+byteVar[0]+"\n"+
|
||||
s.append(charVar[0]+"\n"+byteVar[0]+"\n"+
|
||||
shortVar[0]+"\n"+ushortVar[0]+"\n"+intVar[0]+"\n"+
|
||||
uintVar[0]+"\n"+longVar[0]+"\n"+ulongVar[0]+"\n"+
|
||||
floatVar[0]+"\n"+doubleVar[0]+"\n"+stringVar[0]+"\n"+
|
||||
intAVar[0][0]+"\n"+intAVar[0][1]+"\n"+intAVar[0][2]+"\n");
|
||||
stringVar[0]+"\n");
|
||||
|
||||
server.testMixed(boolVar, charVar, byteVar, shortVar, ushortVar,
|
||||
intVar, uintVar, longVar, ulongVar, floatVar,
|
||||
doubleVar, stringVar, count, intAVar);
|
||||
server.testMixed(charVar, byteVar, shortVar, ushortVar,
|
||||
intVar, uintVar, longVar, ulongVar, stringVar);
|
||||
|
||||
s2.append(boolVar[0]+"\n"+charVar[0]+"\n"+byteVar[0]+"\n"+
|
||||
s2.append(charVar[0]+"\n"+byteVar[0]+"\n"+
|
||||
shortVar[0]+"\n"+ushortVar[0]+"\n"+intVar[0]+"\n"+
|
||||
uintVar[0]+"\n"+longVar[0]+"\n"+ulongVar[0]+"\n"+
|
||||
floatVar[0]+"\n"+doubleVar[0]+"\n"+stringVar[0]+"\n"+
|
||||
intAVar[0][0]+"\n"+intAVar[0][1]+"\n"+intAVar[0][2]+"\n");
|
||||
stringVar[0]+"\n");
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.mixed");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.mixed");
|
||||
}
|
||||
|
||||
private void testObject() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testObject");
|
||||
iJ2XINOUTServerTestComponent[] objectVar= new iJ2XINOUTServerTestComponent[1];
|
||||
objectVar[0] = server;
|
||||
|
||||
printResult("!!!Right string!!!","j2x.inout.client.object"); //!!!Mat' Mat'
|
||||
server.testObject(objectVar);
|
||||
objectVar[0].testObj2();
|
||||
}
|
||||
|
||||
public Object queryInterface(IID iid) {
|
||||
System.out.println("DEbug:avm:J2XINOUTClientTestComponent::queryInterface iid="+iid);
|
||||
|
||||
@@ -31,22 +31,26 @@ JAVA_OR_NSJVM=1
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XINOUTClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XINOUTClientTestComponent.java
|
||||
J2XINOUTClientTestComponent.jar.comp: manifest javai J2XINOUTClientTestComponent.class
|
||||
#JAVAI_SRC = \
|
||||
# iJ2XINOUTClientTestComponent.java
|
||||
J2XINOUTClientTestComponent.jar.comp: manifest J2XINOUTClientTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm J2XINOUTClientTestComponent.jar.comp manifest *.class
|
||||
|
||||
J2XINOUTClientTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
#javai::
|
||||
# $(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
install-component: J2XINOUTClientTestComponent.jar.comp J2XINOUTClientTestComponent.jar.info
|
||||
cp -f J2XINOUTClientTestComponent.jar* $(DIST)/bin/components
|
||||
@@ -55,3 +59,4 @@ clobber::
|
||||
rm -f $(DIST)/bin/components/J2XINOUTClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
rm -f $(DIST)/../classes/J2XINOUTClientTestComponent.class
|
||||
|
||||
@@ -29,19 +29,25 @@ VPATH = .
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XINOUTClientTestComponent
|
||||
COMPONENT=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XINOUTClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XINOUTClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XINOUTClientTestComponent.java
|
||||
J2XINOUTClientTestComponent.java \
|
||||
$(NULL)
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
J2XINOUTClientTestComponent.jar.comp: manifest J2XINOUTClientTestComponent.class
|
||||
$(JDKHOME)\bin\jar cvfm J2XINOUTClientTestComponent.jar.comp manifest *.class
|
||||
@@ -49,18 +55,13 @@ J2XINOUTClientTestComponent.jar.comp: manifest J2XINOUTClientTestComponent.clas
|
||||
J2XINOUTClientTestComponent.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai:
|
||||
echo $(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
|
||||
|
||||
install-component: javai J2XINOUTClientTestComponent.jar.comp J2XINOUTClientTestComponent.jar.info $(DLL)
|
||||
install-component: J2XINOUTClientTestComponent.jar.comp J2XINOUTClientTestComponent.jar.info $(DLL)
|
||||
copy J2XINOUTClientTestComponent.jar* $(DIST)\bin\components
|
||||
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\J2XINOUTClientTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XINOUTServerTestComponent.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XINOUTClientTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
-del /f $(DIST)\..\classes\J2XINOUTClientTestComponent.class
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
@@ -28,8 +28,8 @@ VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
@@ -37,7 +37,7 @@ char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* fBuffer=NULL;
|
||||
PRUint8 end_of_data = 112;
|
||||
|
||||
int all=0;
|
||||
|
||||
J2XOUTServerTestComponentImpl::J2XOUTServerTestComponentImpl()
|
||||
{
|
||||
@@ -277,18 +277,19 @@ NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestBoolean(PRBool *i) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestChar(char *i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",i);
|
||||
*i='Z';
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",*i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestWChar(PRUnichar *i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",i);
|
||||
*i='Z';
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",*i);
|
||||
return NS_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -297,10 +298,21 @@ NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestWChar(PRUnichar *i) {
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestString(char **i) {
|
||||
char* str = "Some string";
|
||||
PrintResult("j2x.out.server.string",str);
|
||||
*i = PL_strdup(str);
|
||||
if(stringVars.size()) {
|
||||
*i = stringVars.top();
|
||||
stringVars.pop();
|
||||
//fprintf(stderr,"C++==>%s\n",*i);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",*i);
|
||||
} else {
|
||||
*i = "112";
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
|
||||
// char* str = "Some string";
|
||||
// PrintResult("j2x.out.server.string",fbuffer);
|
||||
// *i = PL_strdup(str);
|
||||
// return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -310,19 +322,32 @@ NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestString(char **i) {
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestWString(PRUnichar **i) {
|
||||
//Verification code.
|
||||
if(all==0) {
|
||||
char* str = "Some test string";
|
||||
nsCString* cStr = new nsCString(str);
|
||||
*i = cStr->ToNewUnicode();
|
||||
//Verification code.
|
||||
nsString nsStr = *(new nsString(*i));
|
||||
NS_ALLOC_STR_BUF(aBuf,nsStr,100)
|
||||
printf("aBuf is %s",aBuf);
|
||||
PrintResult("j2x.out.server.wstring",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
nsString nsStr = *(new nsString(*i));
|
||||
NS_ALLOC_STR_BUF(aBuf,nsStr,100);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf);
|
||||
}
|
||||
if(all==1) {
|
||||
char* str = NULL;
|
||||
nsCString* cStr = new nsCString(str);
|
||||
*i = cStr->ToNewUnicode();
|
||||
nsString nsStr = *(new nsString(*i));
|
||||
NS_ALLOC_STR_BUF(aBuf,nsStr,100);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf);
|
||||
}
|
||||
|
||||
// if(all==2) Flush("wstring");
|
||||
all++;
|
||||
return NS_OK;
|
||||
//
|
||||
PrintResult("j2x.out.server.wstring",str);
|
||||
return NS_OK;
|
||||
// PrintResult("j2x.out.server.wstring",str);
|
||||
// return NS_OK;
|
||||
}
|
||||
/**
|
||||
|
||||
|
||||
@@ -25,9 +25,10 @@ DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XOUTServerTestComponent
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
@@ -50,11 +51,16 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XOUTServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XOUTServerTestComponent.java
|
||||
#JAVAI = iJ2XOUTServerTestComponent.java
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
#JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
#export::
|
||||
# $(JAVAC) $(JAVAI)
|
||||
|
||||
@@ -38,8 +38,8 @@ interface iJ2XOUTServerTestComponent : nsISupports
|
||||
void TestFloat(out float i);
|
||||
void TestDouble(out double i);
|
||||
void TestBoolean(out boolean i);
|
||||
// void TestChar(out char i);
|
||||
//void TestWChar(out wchar i);
|
||||
void TestChar(out char i);
|
||||
void TestWChar(out wchar i);
|
||||
void TestString(out string i);
|
||||
void TestWString(out wstring i);
|
||||
void TestStringArray(in unsigned long count,[array, size_is(count)] out string valueArray);
|
||||
|
||||
@@ -56,6 +56,12 @@ public interface iJ2XOUTServerTestComponent extends nsISupports
|
||||
/* void TestBoolean (out boolean i); */
|
||||
public void testBoolean(boolean[] i);
|
||||
|
||||
/* void TestChar (out char i); */
|
||||
public void testChar(char[] i);
|
||||
|
||||
/* void TestWChar (out wchar i); */
|
||||
public void testWChar(char[] i);
|
||||
|
||||
/* void TestString (out string i); */
|
||||
public void testString(String[] i);
|
||||
|
||||
|
||||
@@ -28,7 +28,11 @@ DLLNAME = J2XOUTServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XOUTServerTestComponent
|
||||
COMPONENT = 1
|
||||
JAVAI= iJ2XOUTServerTestComponent.java
|
||||
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XOUTServerTestComponent.idl \
|
||||
@@ -39,22 +43,17 @@ CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XOUTServerTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
JAVAC=$(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes
|
||||
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\J2XOUT*.xpt
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
|
||||
@@ -97,6 +97,10 @@ public class J2XOUTClientTestComponent implements iJ2XOUTClientTestComponent, iC
|
||||
return;
|
||||
}
|
||||
|
||||
if(!exclusionHash.containsKey("char"))
|
||||
testChar();
|
||||
if(!exclusionHash.containsKey("wchar"))
|
||||
testWChar();
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
@@ -262,24 +266,62 @@ private void testBoolean() {
|
||||
printResult(s.toString(),"j2x.out.client.boolean");
|
||||
server.flush("boolean");
|
||||
}
|
||||
|
||||
/*
|
||||
//server.testChar(charVar);
|
||||
//server.testWChar(charVar);
|
||||
*/
|
||||
private void testString() {
|
||||
|
||||
|
||||
private void testChar() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
char [] charVar = new char[1];
|
||||
System.err.println("server.testChar");
|
||||
server.testChar(charVar);
|
||||
s.append(charVar[0]+"\n");
|
||||
printResult(s.toString(),"j2x.out.client.char");
|
||||
server.flush("char");
|
||||
}
|
||||
|
||||
private void testWChar() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
char [] wcharVar = new char[1];
|
||||
System.err.println("server.testWChar");
|
||||
server.testWChar(wcharVar);
|
||||
s.append(wcharVar[0]+"\n");
|
||||
printResult(s.toString(),"j2x.out.client.wchar");
|
||||
server.flush("wchar");
|
||||
}
|
||||
|
||||
private void testString() {
|
||||
/* StringBuffer s = new StringBuffer();
|
||||
String[] stringVar = new String[1];
|
||||
server.testString(stringVar);
|
||||
s.append(stringVar[0]+"\n");
|
||||
printResult(s.toString(),"j2x.out.client.string");
|
||||
server.flush("string");
|
||||
*/
|
||||
StringBuffer s = new StringBuffer();
|
||||
String[] sVar = new String[1];
|
||||
// System.err.println("server.string");
|
||||
server.testString(sVar);
|
||||
System.err.println("-->"+sVar[0]);
|
||||
try{
|
||||
while(!sVar[0].equals("112")) {
|
||||
s.append(sVar[0]+"\n");
|
||||
server.testString(sVar);
|
||||
System.err.println("-->"+sVar[0]);
|
||||
}
|
||||
}catch(Exception e) {
|
||||
s.append("null"+"\n");
|
||||
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.string");
|
||||
server.flush("string");
|
||||
}
|
||||
|
||||
private void testsWstring() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
String[] stringVar = new String[1];
|
||||
server.testWString(stringVar);
|
||||
s.append(stringVar[0]+"\n");
|
||||
server.testWString(stringVar);
|
||||
s.append(stringVar[0]+"\n");
|
||||
printResult(s.toString(),"j2x.out.client.wstring");
|
||||
server.flush("wstring");
|
||||
}
|
||||
@@ -297,8 +339,8 @@ private void testStringArray() {
|
||||
}
|
||||
private void testLongArray() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
int[][] intArray = new int[1][100];
|
||||
int count = 100;
|
||||
int[][] intArray = new int[1][3];
|
||||
int count = 3;
|
||||
server.testLongArray(count, intArray);
|
||||
for(int i=0;i<count;i++) {
|
||||
s.append(intArray[0][i]+"\n");
|
||||
@@ -307,8 +349,8 @@ private void testLongArray() {
|
||||
|
||||
}
|
||||
private void testCharArray() {
|
||||
char[][] charArray = new char[1][100];
|
||||
int count = 100;
|
||||
char[][] charArray = new char[1][6];
|
||||
int count = 6;
|
||||
StringBuffer s = new StringBuffer();
|
||||
server.testCharArray(count, charArray);
|
||||
for(int i=0;i<count;i++) {
|
||||
@@ -330,7 +372,7 @@ private void testCharArray() {
|
||||
float[] fFloat = new float[1];
|
||||
double[] fDouble = new double[1];
|
||||
String[] aString = new String[1];
|
||||
int count = 5;
|
||||
int count = 3;
|
||||
int[][] longArray = new int[1][count];
|
||||
server.testMixed(bBool, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble, aString, count, longArray);
|
||||
StringBuffer s = new StringBuffer();
|
||||
|
||||
@@ -31,22 +31,26 @@ JAVA_OR_NSJVM=1
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XOUTClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XOUTClientTestComponent.java
|
||||
J2XOUTClientTestComponent.jar.comp: manifest javai J2XOUTClientTestComponent.class
|
||||
#JAVAI_SRC = \
|
||||
# iJ2XOUTClientTestComponent.java
|
||||
J2XOUTClientTestComponent.jar.comp: manifest J2XOUTClientTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm J2XOUTClientTestComponent.jar.comp manifest *.class
|
||||
|
||||
J2XOUTClientTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
#javai::
|
||||
# $(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
install-component: J2XOUTClientTestComponent.jar.comp J2XOUTClientTestComponent.jar.info
|
||||
cp -f J2XOUTClientTestComponent.jar* $(DIST)/bin/components
|
||||
@@ -55,3 +59,4 @@ clobber::
|
||||
rm -f $(DIST)/bin/components/J2XOUTClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
rm -f $(DIST)/../classes/J2XOUTClientTestComponent.class
|
||||
|
||||
@@ -29,18 +29,25 @@ VPATH = .
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XOUTClientTestComponent
|
||||
COMPONENT=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XOUTClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XOUTClientTestComponent.java
|
||||
J2XOUTClientTestComponent.java \
|
||||
$(NULL)
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XOUTClientTestComponent.java
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
J2XOUTClientTestComponent.jar.comp: manifest J2XOUTClientTestComponent.class
|
||||
$(JDKHOME)\bin\jar cvfm J2XOUTClientTestComponent.jar.comp manifest *.class
|
||||
@@ -48,18 +55,13 @@ J2XOUTClientTestComponent.jar.comp: manifest J2XOUTClientTestComponent.class
|
||||
J2XOUTClientTestComponent.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai:
|
||||
echo $(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
|
||||
|
||||
install-component: javai J2XOUTClientTestComponent.jar.comp J2XOUTClientTestComponent.jar.info $(DLL)
|
||||
install-component: J2XOUTClientTestComponent.jar.comp J2XOUTClientTestComponent.jar.info $(DLL)
|
||||
copy J2XOUTClientTestComponent.jar* $(DIST)\bin\components
|
||||
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\J2XOUTClientTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XOUTServerTestComponent.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XOUTClientTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
-del /f $(DIST)\..\classes\J2XOUTClientTestComponent.class
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
@@ -28,8 +28,8 @@ VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
@@ -216,7 +216,7 @@ NS_IMETHODIMP J2XRETServerTestComponentImpl::TestBoolean(PRBool *i) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestChar(char *i) {
|
||||
if(charVars.size()) {
|
||||
*i = charVars.top();
|
||||
@@ -241,7 +241,7 @@ NS_IMETHODIMP J2XRETServerTestComponentImpl::TestWChar(PRUnichar *i) {
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestString(char* *i) {
|
||||
|
||||
@@ -249,7 +249,9 @@ NS_IMETHODIMP J2XRETServerTestComponentImpl::TestString(char* *i) {
|
||||
*i = stringVars.top();
|
||||
stringVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",*i);
|
||||
//fprintf(stderr,"\n==>%s\n",*i);
|
||||
} else {
|
||||
//fprintf(stderr,"\n==>FLASH\n");
|
||||
*i="";
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s",*i);
|
||||
Flush("string");
|
||||
@@ -285,7 +287,7 @@ char* _string="";
|
||||
}
|
||||
}
|
||||
if (all==2) {
|
||||
_string="null string";
|
||||
_string=NULL;
|
||||
nsCString* cstr=new nsCString(_string);
|
||||
*i=cstr->ToNewUnicode();
|
||||
nsString str = *(new nsString(*i));
|
||||
@@ -335,7 +337,7 @@ NS_IMETHODIMP J2XRETServerTestComponentImpl::TestLongArray(PRUint32 count, int *
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestCharArray(PRUint32 count, char **valueArray) {
|
||||
|
||||
char* ret=(char*)PR_Malloc(sizeof(char)*3);
|
||||
@@ -350,7 +352,7 @@ NS_IMETHODIMP J2XRETServerTestComponentImpl::TestCharArray(PRUint32 count, char
|
||||
*valueArray=ret;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestObject(iJ2XRETServerTestComponent **obj) {
|
||||
*obj=this;
|
||||
|
||||
@@ -25,9 +25,10 @@ DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XRETServerTestComponent
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
@@ -50,11 +51,16 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XRETServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XRETServerTestComponent.java
|
||||
#JAVAI = iJ2XRETServerTestComponent.java
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
#JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
#export::
|
||||
# $(JAVAC) $(JAVAI)
|
||||
|
||||
@@ -38,13 +38,13 @@ interface iJ2XRETServerTestComponent : nsISupports
|
||||
float TestFloat();
|
||||
double TestDouble();
|
||||
boolean TestBoolean();
|
||||
char TestChar();
|
||||
wchar TestWChar();
|
||||
// char TestChar();
|
||||
// wchar TestWChar();
|
||||
string TestString();
|
||||
wstring TestWString();
|
||||
void TestStringArray(in unsigned long count, [retval, array, size_is(count)] out string stringArray);
|
||||
void TestLongArray(in unsigned long count, [retval, array, size_is(count)] out long intArray);
|
||||
void TestCharArray(in unsigned long count,[retval, array, size_is(count)] out char charArray);
|
||||
// void TestCharArray(in unsigned long count,[retval, array, size_is(count)] out char charArray);
|
||||
iJ2XRETServerTestComponent TestObject();
|
||||
void TestObj();
|
||||
};
|
||||
|
||||
@@ -56,12 +56,6 @@ public interface iJ2XRETServerTestComponent extends nsISupports
|
||||
/* boolean TestBoolean (); */
|
||||
public boolean testBoolean();
|
||||
|
||||
/* char TestChar (); */
|
||||
public char testChar();
|
||||
|
||||
/* wchar TestWChar (); */
|
||||
public char testWChar();
|
||||
|
||||
/* string TestString (); */
|
||||
public String testString();
|
||||
|
||||
@@ -74,9 +68,6 @@ public interface iJ2XRETServerTestComponent extends nsISupports
|
||||
/* void TestLongArray (in unsigned long count, [array, size_is (count), retval] out long intArray); */
|
||||
public int[] testLongArray(int count);
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count), retval] out char charArray); */
|
||||
public char[] testCharArray(int count);
|
||||
|
||||
/* iJ2XRETServerTestComponent TestObject (); */
|
||||
public iJ2XRETServerTestComponent testObject();
|
||||
|
||||
|
||||
@@ -28,30 +28,30 @@ DLLNAME = J2XRETServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XRETServerTestComponent
|
||||
COMPONENT = 1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS = .\iJ2XRETServerTestComponent.idl
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XRETServerTestComponent.obj \
|
||||
.\$(OBJDIR)\J2XRETServerTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
XPIDLSRCS = .\iJ2XRETServerTestComponent.idl
|
||||
|
||||
JAVAI= iJ2XRETServerTestComponent.java
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
JAVAC=$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\J2XRET*.xpt
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
|
||||
|
||||
@@ -108,8 +108,12 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
System.err.println("Server is not initialized!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
/*
|
||||
if(!exclusionHash.containsKey("char"))
|
||||
testChar();
|
||||
if(!exclusionHash.containsKey("wchar"))
|
||||
testWChar();
|
||||
*/ if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
testLong();
|
||||
@@ -137,8 +141,8 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
testStringArray();
|
||||
if(!exclusionHash.containsKey("longArray"))
|
||||
testLongArray();
|
||||
if(!exclusionHash.containsKey("charArray"))
|
||||
testCharArray();
|
||||
// if(!exclusionHash.containsKey("charArray"))
|
||||
// testCharArray();
|
||||
if(!exclusionHash.containsKey("object"))
|
||||
testObject();
|
||||
|
||||
@@ -254,17 +258,23 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
server.testBoolean();
|
||||
}
|
||||
|
||||
|
||||
private void testString() {
|
||||
s = new StringBuffer();
|
||||
String stringVar ="8";
|
||||
|
||||
stringVar=server.testString();
|
||||
try{
|
||||
while(!stringVar.equals("112")) {
|
||||
s.append(stringVar+"\n");
|
||||
stringVar=server.testString();
|
||||
}
|
||||
}catch(Exception e) {
|
||||
s.append(stringVar+"\n");
|
||||
}
|
||||
|
||||
printResult(s.toString(),"j2x.ret.client.string");
|
||||
server.testString();
|
||||
server.flush("string");
|
||||
}
|
||||
|
||||
private void testWString() {
|
||||
@@ -288,7 +298,7 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
s.append(intAVar[i]+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.longArray");
|
||||
}
|
||||
|
||||
/*
|
||||
private void testCharArray() {
|
||||
s = new StringBuffer();
|
||||
char[] charAVar = {'0','0','0'};
|
||||
@@ -298,7 +308,7 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
s.append(charAVar[i]+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.charArray");
|
||||
}
|
||||
|
||||
*/
|
||||
private void testStringArray() {
|
||||
s = new StringBuffer();
|
||||
String[] stringAVar = {"0","0","0"};
|
||||
@@ -320,7 +330,7 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
}
|
||||
printResult("!!!Right string!!!","j2x.ret.client.object");
|
||||
}
|
||||
|
||||
/*
|
||||
private void testWChar() {
|
||||
s = new StringBuffer();
|
||||
char wcharVar = '8';
|
||||
@@ -342,7 +352,7 @@ public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iC
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.char");
|
||||
}
|
||||
|
||||
*/
|
||||
public Object queryInterface(IID iid) {
|
||||
System.out.println("DEbug:avm:J2XRETClientTestComponent::queryInterface iid="+iid);
|
||||
if ( iid.equals(nsISupports.IID)
|
||||
|
||||
@@ -31,22 +31,26 @@ JAVA_OR_NSJVM=1
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XRETClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XRETClientTestComponent.java
|
||||
J2XRETClientTestComponent.jar.comp: manifest javai J2XRETClientTestComponent.class
|
||||
#JAVAI_SRC = \
|
||||
# iJ2XRETClientTestComponent.java
|
||||
J2XRETClientTestComponent.jar.comp: manifest J2XRETClientTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm J2XRETClientTestComponent.jar.comp manifest *.class
|
||||
|
||||
J2XRETClientTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
#javai::
|
||||
# $(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
install-component: J2XRETClientTestComponent.jar.comp J2XRETClientTestComponent.jar.info
|
||||
cp -f J2XRETClientTestComponent.jar* $(DIST)/bin/components
|
||||
@@ -55,3 +59,4 @@ clobber::
|
||||
rm -f $(DIST)/bin/components/J2XRETClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
rm -f $(DIST)/../classes/J2XRETClientTestComponent.class
|
||||
|
||||
@@ -29,18 +29,25 @@ VPATH = .
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XRETClientTestComponent
|
||||
COMPONENT=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XRETClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XRETClientTestComponent.java
|
||||
J2XRETClientTestComponent.java \
|
||||
$(NULL)
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XRETClientTestComponent.java
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
J2XRETClientTestComponent.jar.comp: manifest J2XRETClientTestComponent.class
|
||||
$(JDKHOME)\bin\jar cvfm J2XRETClientTestComponent.jar.comp manifest *.class
|
||||
@@ -48,17 +55,13 @@ J2XRETClientTestComponent.jar.comp: manifest J2XRETClientTestComponent.class
|
||||
J2XRETClientTestComponent.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai:
|
||||
echo $(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI_SRC)
|
||||
|
||||
install-component: javai J2XRETClientTestComponent.jar.comp J2XRETClientTestComponent.jar.info $(DLL)
|
||||
install-component: J2XRETClientTestComponent.jar.comp J2XRETClientTestComponent.jar.info $(DLL)
|
||||
copy J2XRETClientTestComponent.jar* $(DIST)\bin\components
|
||||
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\J2XRETClientTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XRETServerTestComponent.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iJ2XRETClientTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
-del /f $(DIST)\..\classes\J2XRETClientTestComponent.class
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
|
||||
DEPTH=../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
@@ -30,28 +32,29 @@ MODULE = BCTestLoader
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
XPIDL_MODULE = $(MODULE)
|
||||
IS_COMPONENT = 1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
EXPORTS = \
|
||||
BCTest.h \
|
||||
ProceedResults.h \
|
||||
Values.h \
|
||||
VarContainer.h \
|
||||
VarContainer.h \
|
||||
PseudoHash.h \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
BCTestLoader.cpp \
|
||||
BCTestLoaderFactory.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
BCITestLoader.idl \
|
||||
iClientTestComponent.idl \
|
||||
iJClientTestComponent.idl\
|
||||
iExclusionSupport.idl\
|
||||
$(NULL)
|
||||
JAVAI= iClientTestComponent.java \
|
||||
iJClientTestComponent.java \
|
||||
iExclusionSupport.java
|
||||
|
||||
DSO_LDOPTS += \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
@@ -59,28 +62,27 @@ DSO_LDOPTS += \
|
||||
|
||||
COMMON_JAVA = VarContainer.java
|
||||
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)/bin/javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH):$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
export::
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI) $(COMMON_JAVA)
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(COMMON_JAVA)
|
||||
|
||||
|
||||
#A little temporary hack with messenger
|
||||
install::
|
||||
cp -f start.html $(DIST)/bin/chrome/messenger/content/messenger
|
||||
|
||||
clobber-java:
|
||||
clobber::
|
||||
rm -f *.class *.jar
|
||||
clobber:: clobber-java
|
||||
rm -f $(DIST)/include/BCTest.h
|
||||
rm -f $(DIST)/include/ProceedResults.h
|
||||
rm -f $(DIST)/include/Values.h
|
||||
rm -f $(DIST)/include/VarContainer.h
|
||||
rm -f $(DIST)/include/PseudoHash.h
|
||||
rm -f $(DIST)/classes/VarContainer.class
|
||||
rm -f $(DIST)/classes/org/mozilla/xpcom/iClientTestComponent.class
|
||||
rm -f $(DIST)/classes/org/mozilla/xpcom/iJClientTestComponent.class
|
||||
rm -f $(DIST)/classes/org/mozilla/xpcom/iExclusionSupport.class
|
||||
|
||||
clobber-java:: clobber
|
||||
clobber_all:: clobber-java
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
#define char_last 'Z'
|
||||
#define wchar_first '0'
|
||||
#define wchar_last 'Z'
|
||||
#define string_first "iddqd"
|
||||
#define string_first NULL
|
||||
#define string_empty ""
|
||||
#define string_null "Here must be the NULL string"
|
||||
#define string_null "iddqd"
|
||||
#define string_last "112"
|
||||
|
||||
|
||||
@@ -36,12 +36,16 @@ public class VarContainer {
|
||||
public static int unsignedIntVar = 3000000;
|
||||
public static long unsignedLongVar = 1000001;
|
||||
public static float floatVar = (float)2.0;
|
||||
public static double doubleVar = 3.0;
|
||||
public static double doubleVar = (double)3.0;
|
||||
public static boolean booleanVar = true;
|
||||
public static char charTruncVar = 'A';
|
||||
public static char charVar = 'B';
|
||||
public static String charPVar = "This is some string";
|
||||
public static String charPVar2 = "";
|
||||
public static String charPVar3 = null;
|
||||
public static String unicharPVar = "UUUAAARRR";
|
||||
public static String unicharPVar2 = "";
|
||||
public static String unicharPVar3 = null;
|
||||
//end of compatibility section
|
||||
|
||||
public static byte endOfData = 112;
|
||||
@@ -84,8 +88,12 @@ public class VarContainer {
|
||||
public static char wcharLast = 'Z';
|
||||
public static String stringFirst = "iddqd";
|
||||
public static String stringEmpty = "";
|
||||
public static String stringNull = "Here must be the NULL string";
|
||||
public static String stringNull = null;
|
||||
public static String stringLast = "112";
|
||||
public static String wstringFirst = "iddqd";
|
||||
public static String wstringEmpty = "";
|
||||
public static String wstringNull = null;
|
||||
public static String wstringLast = "112";
|
||||
|
||||
//stacks
|
||||
public Stack byteStack = null;
|
||||
@@ -100,6 +108,7 @@ public Stack doubleStack = null;
|
||||
public Stack charStack = null;
|
||||
public Stack wcharStack = null;
|
||||
public Stack stringStack = null;
|
||||
public Stack wstringStack = null;
|
||||
//Constructor with stacks initialization
|
||||
public VarContainer() {
|
||||
byteStack = new Stack();
|
||||
@@ -154,6 +163,11 @@ public VarContainer() {
|
||||
stringStack.push(stringEmpty);
|
||||
stringStack.push(stringNull);
|
||||
stringStack.push(stringLast);
|
||||
wstringStack = new Stack();
|
||||
wstringStack.push(wstringFirst);
|
||||
wstringStack.push(wstringEmpty);
|
||||
wstringStack.push(wstringNull);
|
||||
wstringStack.push(wstringLast);
|
||||
|
||||
}
|
||||
|
||||
@@ -248,6 +262,14 @@ public String getNextString() {
|
||||
}
|
||||
}
|
||||
|
||||
public String getNextWString() {
|
||||
try {
|
||||
return (String)wstringStack.pop();
|
||||
}catch(EmptyStackException e) {
|
||||
return wstringLast;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=..\..\..\..\..\..
|
||||
MODULE=BCTestLoader
|
||||
@@ -25,11 +27,11 @@ MODULE=BCTestLoader
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME=$(MODULE)
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
JAVAI= iClientTestComponent.java \
|
||||
iJClientTestComponent.java \
|
||||
iExclusionSupport.java
|
||||
|
||||
COMMON_JAVA= VarContainer.java
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS= .\BCITestLoader.idl \
|
||||
.\iClientTestComponent.idl \
|
||||
@@ -54,16 +56,16 @@ LINCS=\
|
||||
-I$(PUBLIC)\xpcom \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
JDIRS = .
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath $(CLASSPATH);$(JAVA_DESTPATH) -d $(JAVA_DESTPATH)
|
||||
|
||||
javai:
|
||||
echo $(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes; -d $(DEPTH)\dist\classes $(JAVAI) $(COMMON_JAVA)
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes $(JAVAI) $(COMMON_JAVA)
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\javarules.mak>
|
||||
|
||||
#A little temporary hack with messenger
|
||||
install:: $(DLL) javai
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
$(MAKE_INSTALL) start.html $(DIST)\bin\chrome\messenger\content\messenger
|
||||
$(MAKE_INSTALL) BCTest.h $(DIST)\..\include
|
||||
$(MAKE_INSTALL) ProceedResults.h $(DIST)\..\include
|
||||
$(MAKE_INSTALL) PseudoHash.h $(DIST)\..\include
|
||||
@@ -76,7 +78,4 @@ clobber::
|
||||
del /f $(DIST)\..\include\Values.h
|
||||
del /f $(DIST)\..\include\VarContainer.h
|
||||
del /f $(DIST)\..\include\PseudoHash.h
|
||||
del /f $(DIST)\..\classes\org\mozilla\xpcom\iClientTestComponent.class
|
||||
del /f $(DIST)\..\classes\org\mozilla\xpcom\iJClientTestComponent.class
|
||||
del /f $(DIST)\..\classes\org\mozilla\xpcom\iExclusionSupport.class
|
||||
del /f $(DIST)\..\classes\VarContainer.class
|
||||
|
||||
@@ -37,9 +37,9 @@ CPPSRCS = \
|
||||
X2JINClientTestComponent.cpp \
|
||||
X2JINClientTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = iX2JINClientTestComponent.idl
|
||||
|
||||
JAVAI = iX2JINClientTestComponent.class
|
||||
DSO_LDOPTS += \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
@@ -47,7 +47,3 @@ DSO_LDOPTS += \
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(JAVAI)::
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DIST)/classes -d $(DIST)/classes $<
|
||||
|
||||
install:: $(JAVAI)
|
||||
|
||||
@@ -424,11 +424,25 @@
|
||||
_wstring=cstr->ToNewUnicode();
|
||||
|
||||
nsString str = *(new nsString(_wstring));
|
||||
|
||||
NS_ALLOC_STR_BUF(aBuf,str,14)
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf,str,256)
|
||||
val=PR_sprintf_append(val,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
}
|
||||
serverComponent->TestWString(_wstring);
|
||||
|
||||
|
||||
_string=NULL;
|
||||
|
||||
cstr=new nsCString(_string);
|
||||
_wstring=cstr->ToNewUnicode();
|
||||
|
||||
str = *(new nsString(_wstring));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf1,str,256)
|
||||
val=PR_sprintf_append(val,"%s\n",aBuf1);
|
||||
NS_FREE_STR_BUF(aBuf1)
|
||||
}
|
||||
serverComponent->TestWString(_wstring);
|
||||
|
||||
PrintResult("x2j.in.client.wstring",val);
|
||||
|
||||
@@ -48,4 +48,5 @@ install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\X2JIN*.xpt
|
||||
del /f $(DIST)\bin\components\X2JINC*.xpt
|
||||
del /f $(DIST)\bin\components\X2JINS*.xpt
|
||||
|
||||
@@ -31,25 +31,19 @@ JAVA_OR_NSJVM = 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
export::
|
||||
$(JDKHOME)/bin/javac -classpath $(CLASSPATH) -d $(JAVA_DESTPATH) iX2JINServerTestComponent.java
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC=X2JINServerTestComponent.java
|
||||
|
||||
JAVAI_SRC=iX2JINServerTestComponent.java
|
||||
X2JINServerTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(CLASSPATH) X2JINServerTestComponent.java
|
||||
|
||||
X2JINServerTestComponent.jar.comp: manifest X2JINServerTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm X2JINServerTestComponent.jar.comp manifest *.class
|
||||
|
||||
X2JINServerTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
|
||||
|
||||
install-component: javai X2JINServerTestComponent.jar.comp X2JINServerTestComponent.jar.info
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
install-component: X2JINServerTestComponent.jar.comp X2JINServerTestComponent.jar.info
|
||||
cp -f X2JINServerTestComponent.jar* $(DIST)/bin/components
|
||||
|
||||
clobber::
|
||||
|
||||
@@ -271,7 +271,7 @@ System.out.println("TESTOBJ");
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testIID(IID iid) {
|
||||
S=S+iid.toString()+"\n";
|
||||
S=S+iid.getString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,7 +279,7 @@ System.out.println("TESTOBJ");
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testCID(CID cid) {
|
||||
S=S+cid.toString()+"\n";
|
||||
S=S+cid.getString()+"\n";
|
||||
//CID c=new CID("1ddc5b10-9852-11d4-aa22-00a024a8bbac");
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ X2JINServerTestComponent.jar.comp: manifest iX2JINServerTestComponent.class X2JI
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes iX2JINServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes X2JINServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) -d $(DEPTH)\dist\classes iX2JINServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) X2JINServerTestComponent.java
|
||||
|
||||
install-component: X2JINServerTestComponent.jar.comp X2JINServerTestComponent.jar.info $(DLL)
|
||||
copy X2JINServerTestComponent.jar* $(DIST)\bin\components
|
||||
@@ -52,6 +52,6 @@ install-component: X2JINServerTestComponent.jar.comp X2JINServerTestComponent.ja
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\X2JINServerTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iX2JINServerTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
|
||||
@@ -37,9 +37,9 @@ CPPSRCS = \
|
||||
X2JINOUTClientTestComponent.cpp \
|
||||
X2JINOUTClientTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = iX2JINOUTClientTestComponent.idl
|
||||
|
||||
JAVAI = iX2JINOUTClientTestComponent.class
|
||||
DSO_LDOPTS += \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
@@ -47,7 +47,3 @@ DSO_LDOPTS += \
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(JAVAI)::
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DIST)/classes -d $(DIST)/classes $<
|
||||
|
||||
install:: $(JAVAI)
|
||||
|
||||
@@ -492,6 +492,23 @@ void X2JINOUTClientTestComponentImpl::TestWString(){
|
||||
NS_FREE_STR_BUF(aBuf2)
|
||||
}
|
||||
|
||||
_string=NULL;
|
||||
cstr=new nsCString(_string);
|
||||
_wstring=cstr->ToNewUnicode();
|
||||
str = *(new nsString(_wstring));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf5,str,100)
|
||||
val=PR_sprintf_append(val,"%s\n",aBuf5);
|
||||
NS_FREE_STR_BUF(aBuf5)
|
||||
}
|
||||
serverComponent->TestWString(&_wstring);
|
||||
str = *(new nsString(_wstring));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf6,str,100)
|
||||
xval=PR_sprintf_append(xval,"%s\n",aBuf6);
|
||||
NS_FREE_STR_BUF(aBuf6)
|
||||
}
|
||||
|
||||
_string="Test string.";
|
||||
cstr=new nsCString(_string);
|
||||
_wstring=cstr->ToNewUnicode();
|
||||
|
||||
@@ -35,21 +35,18 @@ include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC=X2JINOUTServerTestComponent.java
|
||||
|
||||
JAVAI_SRC=iX2JINOUTServerTestComponent.java
|
||||
X2JINOUTServerTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(CLASSPATH) X2JINOUTServerTestComponent.java
|
||||
|
||||
X2JINOUTServerTestComponent.jar.comp: manifest X2JINOUTServerTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm X2JINOUTServerTestComponent.jar.comp manifest *.class
|
||||
|
||||
X2JINOUTServerTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
|
||||
|
||||
javai::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
|
||||
export::
|
||||
$(JDKHOME)/bin/javac -classpath $(CLASSPATH) -d $(DEPTH)/dist/classes iX2JINOUTServerTestComponent.java
|
||||
|
||||
|
||||
install-component: javai X2JINOUTServerTestComponent.jar.comp X2JINOUTServerTestComponent.jar.info
|
||||
|
||||
install-component: X2JINOUTServerTestComponent.jar.comp X2JINOUTServerTestComponent.jar.info
|
||||
cp -f X2JINOUTServerTestComponent.jar* $(DIST)/bin/components
|
||||
|
||||
clobber::
|
||||
|
||||
@@ -41,8 +41,8 @@ X2JINOUTServerTestComponent.jar.comp: manifest iX2JINOUTServerTestComponent.clas
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes iX2JINOUTServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes X2JINOUTServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) -d $(DEPTH)\dist\classes iX2JINOUTServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) X2JINOUTServerTestComponent.java
|
||||
|
||||
install-component: X2JINOUTServerTestComponent.jar.comp X2JINOUTServerTestComponent.jar.info $(DLL)
|
||||
copy X2JINOUTServerTestComponent.jar* $(DIST)\bin\components
|
||||
@@ -50,6 +50,6 @@ install-component: X2JINOUTServerTestComponent.jar.comp X2JINOUTServerTestCompon
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\X2JINOUTServerTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iX2JINOUTServerTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
|
||||
@@ -39,15 +39,9 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iX2JOUTClientTestComponent.idl
|
||||
|
||||
JAVAI = iX2JOUTClientTestComponent.class
|
||||
DSO_LDOPTS += \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(JAVAI)::
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DIST)/classes -d $(DIST)/classes $<
|
||||
|
||||
install:: $(JAVAI)
|
||||
|
||||
@@ -455,10 +455,10 @@ void X2JOUTClientTestComponentImpl::TestObject(){
|
||||
PrintResult("x2j.out.client.object","!!!Right string!!!");
|
||||
}
|
||||
|
||||
/*
|
||||
void X2JOUTClientTestComponentImpl::TestIID() {
|
||||
|
||||
// void X2JOUTClientTestComponentImpl::TestIID() {
|
||||
|
||||
/* const nsIID& iid=NS_GET_IID(iX2JOUTServerTestComponent);
|
||||
const nsIID& iid=NS_GET_IID(iX2JOUTServerTestComponent);
|
||||
val=NULL;
|
||||
|
||||
val=iid.ToString();
|
||||
@@ -466,9 +466,9 @@ void X2JOUTClientTestComponentImpl::TestObject(){
|
||||
val=PR_sprintf_append(val,"%s\n",val);
|
||||
PrintResult("x2j.out.client.iid",val);
|
||||
serverComponent->TestIID(&iid);
|
||||
*/
|
||||
// }
|
||||
|
||||
}
|
||||
*/
|
||||
// void X2JOUTClientTestComponentImpl::TestCID() {
|
||||
/*
|
||||
NS_DEFINE_CID(cid,X2JOUTCLIENTTESTCOMPONENT_CID);
|
||||
|
||||
@@ -30,21 +30,16 @@ XPIDL_MODULE = X2JOUTServerTestComponent
|
||||
JAVA_OR_NSJVM = 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
X2JOUTServerTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes X2JOUTServerTestComponent.java
|
||||
|
||||
JDIRS=.
|
||||
|
||||
X2JOUTServerTestComponent.jar.comp: manifest iX2JOUTServerTestComponent.class X2JOUTServerTestComponent.class
|
||||
X2JOUTServerTestComponent.jar.comp: manifest X2JOUTServerTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm X2JOUTServerTestComponent.jar.comp manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
export::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes iX2JOUTServerTestComponent.java
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes X2JOUTServerTestComponent.java
|
||||
|
||||
install-component: X2JOUTServerTestComponent.jar.comp X2JOUTServerTestComponent.jar.info
|
||||
cp -f X2JOUTServerTestComponent.jar* $(DIST)/bin/components
|
||||
|
||||
@@ -316,7 +316,7 @@ public class X2JOUTServerTestComponent implements iX2JOUTServerTestComponent {
|
||||
public void testWString(String[] i) {
|
||||
switch (all) {
|
||||
case 0: i[0]=""; break;
|
||||
case 1: i[0]="Null must be here"; break;
|
||||
case 1: i[0]=null; break;
|
||||
case 2: i[0]="abc"; break;
|
||||
}
|
||||
all++;
|
||||
|
||||
@@ -56,7 +56,7 @@ interface iX2JOUTServerTestComponent : nsISupports {
|
||||
[array, size_is(count)] out long intArray);
|
||||
void testObject(out iX2JOUTServerTestComponent obj);
|
||||
void testObj();
|
||||
// void testIID(out nsIIDRef iid);
|
||||
// void testIID(out nsIIDRef aNameRef);
|
||||
// void testCID(out nsCIDRef cid);
|
||||
|
||||
};
|
||||
|
||||
@@ -39,15 +39,9 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iX2JRETClientTestComponent.idl
|
||||
|
||||
JAVAI = iX2JRETClientTestComponent.class
|
||||
DSO_LDOPTS += \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(JAVAI)::
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DIST)/classes -d $(DIST)/classes $<
|
||||
|
||||
install:: $(JAVAI)
|
||||
|
||||
@@ -30,21 +30,16 @@ XPIDL_MODULE = X2JRETServerTestComponent
|
||||
JAVA_OR_NSJVM = 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
X2JRETServerTestComponent.class:
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes X2JRETServerTestComponent.java
|
||||
|
||||
JDIRS=.
|
||||
|
||||
X2JRETServerTestComponent.jar.comp: manifest iX2JRETServerTestComponent.class X2JRETServerTestComponent.class
|
||||
X2JRETServerTestComponent.jar.comp: manifest X2JRETServerTestComponent.class
|
||||
$(JDKHOME)/bin/jar cvfm X2JRETServerTestComponent.jar.comp manifest *.class
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
export::
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes iX2JRETServerTestComponent.java
|
||||
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes X2JRETServerTestComponent.java
|
||||
|
||||
install-component: X2JRETServerTestComponent.jar.comp X2JRETServerTestComponent.jar.info
|
||||
cp -f X2JRETServerTestComponent.jar* $(DIST)/bin/components
|
||||
|
||||
@@ -327,7 +327,7 @@ public class X2JRETServerTestComponent implements iX2JRETServerTestComponent {
|
||||
switch (all) {
|
||||
case 0: _string=""; break;
|
||||
case 1: _string="abc"; break;
|
||||
case 2: _string="NULL string must be here"; break;
|
||||
case 2: _string=null; break;
|
||||
}
|
||||
all++;
|
||||
S=S+_string+"\n";
|
||||
@@ -347,7 +347,7 @@ public class X2JRETServerTestComponent implements iX2JRETServerTestComponent {
|
||||
switch (all) {
|
||||
case 0: _wstring=""; break;
|
||||
case 1: _wstring="abc"; break;
|
||||
case 2: _wstring="ctrl"; break;
|
||||
case 2: _wstring=null; break;
|
||||
}
|
||||
all++;
|
||||
S=S+_wstring+"\n";
|
||||
|
||||
@@ -44,8 +44,8 @@ X2JRETServerTestComponent.jar.comp: manifest iX2JRETServerTestComponent.class X2
|
||||
.SUFFIXES: .java .class
|
||||
|
||||
.java.class:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes iX2JRETServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes X2JRETServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) -d $(DEPTH)\dist\classes iX2JRETServerTestComponent.java
|
||||
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) X2JRETServerTestComponent.java
|
||||
|
||||
install-component: X2JRETServerTestComponent.jar.comp X2JRETServerTestComponent.jar.info $(DLL)
|
||||
copy X2JRETServerTestComponent.jar* $(DIST)\bin\components
|
||||
@@ -53,6 +53,6 @@ install-component: X2JRETServerTestComponent.jar.comp X2JRETServerTestComponent.
|
||||
clobber::
|
||||
-del /f *.class *.jar.comp
|
||||
-del /f $(DIST)\bin\components\X2JRETServerTestComponent.jar.*
|
||||
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iX2JRETServerTestComponent.*
|
||||
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
|
||||
Reference in New Issue
Block a user