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