*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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user