*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:
idk%eng.sun.com
2001-07-25 22:05:35 +00:00
parent ad651ef17b
commit 4e0a322dbc
92 changed files with 1360 additions and 885 deletions

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -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();
};

View File

@@ -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
*/

View File

@@ -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)