*not part of the build*
fix for 80938 a = avm@sparc.spb.su ovk@sparc.spb.su sva@sparc.spb.su Tests for blackConnect git-svn-id: svn://10.0.0.236/trunk@95860 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
8
mozilla/java/xpcom/test/basic/params/BCTest.lst
Normal file
8
mozilla/java/xpcom/test/basic/params/BCTest.lst
Normal file
@@ -0,0 +1,8 @@
|
||||
X2JIN
|
||||
X2JOUT
|
||||
X2JINOUT
|
||||
X2JRET
|
||||
J2XIN
|
||||
J2XOUT
|
||||
J2XINOUT
|
||||
J2XRET
|
||||
9
mozilla/java/xpcom/test/basic/params/BCTest.lst.old
Normal file
9
mozilla/java/xpcom/test/basic/params/BCTest.lst.old
Normal file
@@ -0,0 +1,9 @@
|
||||
X2JIN
|
||||
X2JOUT
|
||||
X2JINOUT
|
||||
X2JRET
|
||||
J2XIN
|
||||
J2XOUT
|
||||
J2XINOUT
|
||||
J2XRET
|
||||
|
||||
35
mozilla/java/xpcom/test/basic/params/J2XIN/Makefile.in
Normal file
35
mozilla/java/xpcom/test/basic/params/J2XIN/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
@@ -0,0 +1,241 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prenv.h"
|
||||
#include "stdio.h"
|
||||
#include "nsMemory.h"
|
||||
#include "BCTest.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include "J2XINServerTestComponent.h"
|
||||
#include "prmem.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringUtil.h"
|
||||
|
||||
char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* fBuffer=NULL;
|
||||
|
||||
J2XINServerTestComponentImpl::J2XINServerTestComponentImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
printf("DEbug:avm:J2XINServerTestComponentImpl::J2XINServerTestComponentImp\n");
|
||||
testLocation=PR_GetEnv(BC_TEST_LOCATION_VAR_NAME);
|
||||
logLocation=PR_GetEnv(BC_LOG_LOCATION_VAR_NAME);
|
||||
if ((logLocation == NULL)||(testLocation == NULL)) {
|
||||
fprintf(stderr,"ERROR: %s or %s isn't set !", BC_TEST_LOCATION_VAR_NAME, BC_LOG_LOCATION_VAR_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
J2XINServerTestComponentImpl::~J2XINServerTestComponentImpl()
|
||||
{
|
||||
//nb
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(J2XINServerTestComponentImpl, iJ2XINServerTestComponent);
|
||||
IMPL_PROCEED_RESULTS(J2XINServerTestComponentImpl)
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::GetTestLocation(char **tLocation,char **lLocation) {
|
||||
*tLocation = testLocation;
|
||||
*lLocation = logLocation;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::Flush(const char *type) {
|
||||
char* fileName = NULL;
|
||||
fileName = PR_sprintf_append(fileName,"j2x.in.server.%s",type);
|
||||
fprintf(stderr,"Flushing to %s\n", fileName);
|
||||
if(fBuffer) {
|
||||
PrintResult(fileName,fBuffer);
|
||||
PR_smprintf_free(fBuffer);
|
||||
fBuffer = NULL;
|
||||
} else {
|
||||
fprintf(stderr,"ERROR!!fBuffer is null at flush stage\n");
|
||||
}
|
||||
PR_smprintf_free(fileName);
|
||||
if(fBuffer != NULL ) {
|
||||
fprintf(stderr,"fBuffer not NULL after free\n");
|
||||
}else {
|
||||
fprintf(stderr,"fBuffer IS NULL after free\n");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//Test methods
|
||||
|
||||
|
||||
/* void TestShort (in short i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestShort(PRInt16 i) {
|
||||
fprintf(stderr,"Inside TestShort method\n");
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestLong (in long i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestLong(PRInt32 i) {
|
||||
fprintf(stderr,"Inside TestLong method \n");
|
||||
if(fBuffer != NULL ) {
|
||||
fprintf(stderr,"fBuffer not NULL in TestLong\n");
|
||||
} else {
|
||||
fprintf(stderr,"fBuffer IS NULL in TestLong\n");
|
||||
}
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%ld\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestLonglong (in long long i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestLonglong(PRInt64 i) {
|
||||
printf("Inside TestLonglong method\n");
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%lld\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestByte (in octet i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestByte(PRUint8 i) {
|
||||
printf("TestByte\n");
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestUShort (in unsigned short i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestUShort(PRUint16 i) {
|
||||
printf("TestUShort\n");
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%u\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestULong (in unsigned long i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestULong(PRUint32 i) {
|
||||
printf("TestULong\n");
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%lu\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/* void TestULonglong (in unsigned long long i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestULonglong(PRUint64 i) {
|
||||
printf("TestULonglong\n");
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%llu\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestFloat (in float i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestFloat(float i) {
|
||||
fprintf(stderr,"TestFloat: append %.3e\n",i);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestDouble (in double i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestDouble(double i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestBoolean (in boolean i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestBoolean(PRBool i) {
|
||||
if(i == PR_TRUE) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n","true");
|
||||
} else {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n","false");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestChar(char i) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",i);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestWString (in wstring i); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestWString(const PRUnichar *i) {
|
||||
nsString str = *(new nsString(i));
|
||||
NS_ALLOC_STR_BUF(aBuf,str,100)
|
||||
printf("aBuf is %s",aBuf);
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestStringArray (in unsigned long count, [array, size_is (count)] in string valueArray); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestStringArray(PRUint32 count, const char **valueArray) {
|
||||
return PrintResultArray("j2x.in.server.stringArray",count,valueArray);
|
||||
}
|
||||
|
||||
/* void TestLongArray (in unsigned long count, [array, size_is (count)] in long longArray); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestLongArray(PRUint32 count, PRInt32 *longArray) {
|
||||
return PrintResultArray("j2x.in.server.longArray",count,longArray);
|
||||
}
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count)] in 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) {
|
||||
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) {
|
||||
char *str;
|
||||
obj->GetTestObjectString(&str);
|
||||
PrintResult("j2x.in.server.object",str);
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::GetTestObjectString(char **str) {
|
||||
*str = "String Ident";
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestIID (in nsIIDRef iid); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestIID(const nsIID& iid) {
|
||||
fprintf(stderr,"TestIID: append %s\n",iid.ToString());
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",iid.ToString());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* void TestCID (in nsCIDRef cid); */
|
||||
NS_IMETHODIMP J2XINServerTestComponentImpl::TestCID(const nsCID& cid) {
|
||||
fprintf(stderr,"TestCID: append %s\n",cid.ToString());
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",cid.ToString());
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iJ2XINServerTestComponent.h"
|
||||
#include "ProceedResults.h"
|
||||
|
||||
|
||||
class J2XINServerTestComponentImpl : public iJ2XINServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XINSERVERTESTCOMPONENT
|
||||
DECL_PROCEED_RESULTS
|
||||
|
||||
J2XINServerTestComponentImpl();
|
||||
virtual ~J2XINServerTestComponentImpl();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class _MYCLASS_ : public iJ2XINServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XINSERVERTESTCOMPONENT
|
||||
|
||||
_MYCLASS_();
|
||||
virtual ~_MYCLASS_();
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "J2XINServerTestComponent.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(J2XINServerTestComponentImpl)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "J2XIN Server Test Component", J2XINSERVERTESTCOMPONENT_CID, J2XINSERVERTESTCOMPONENT_PROGID, J2XINServerTestComponentImplConstructor,
|
||||
NULL /* NULL if you dont need one */,
|
||||
NULL /* NULL if you dont need one */
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("J2XINServerTestComponentFactory", components)
|
||||
|
||||
60
mozilla/java/xpcom/test/basic/params/J2XIN/cpp/Makefile.in
Normal file
60
mozilla/java/xpcom/test/basic/params/J2XIN/cpp/Makefile.in
Normal file
@@ -0,0 +1,60 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
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) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
J2XINServerTestComponent.cpp \
|
||||
J2XINServerTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XINServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XINServerTestComponent.java
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
@@ -0,0 +1,72 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(3b0e2d20-9852-11d4-aa22-00a024a8bbac)]
|
||||
interface iJ2XINServerTestComponent : nsISupports
|
||||
{
|
||||
void GetTestLocation(out string tLocation, out string lLocation);
|
||||
void flush(in string s);
|
||||
void TestShort(in short i);
|
||||
void TestLong(in long i);
|
||||
void TestLonglong(in long long i);
|
||||
void TestByte(in octet i);
|
||||
void TestUShort(in unsigned short i);
|
||||
void TestULong(in unsigned long i);
|
||||
void TestULonglong(in unsigned long long i);
|
||||
void TestFloat(in float i);
|
||||
void TestDouble(in double i);
|
||||
void TestBoolean(in boolean i);
|
||||
// void TestChar(in char 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 TestObject(in iJ2XINServerTestComponent obj);
|
||||
string GetTestObjectString();
|
||||
void TestIID(in nsIIDRef iid);
|
||||
void TestCID(in nsCIDRef cid);
|
||||
};
|
||||
|
||||
%{ C++
|
||||
#define J2XINSERVERTESTCOMPONENT_CID \
|
||||
{ /*1ddc5b10-9852-11d4-aa22-00a024a8bbac*/ \
|
||||
0x1ddc5b10, \
|
||||
0x9852, \
|
||||
0x11d4, \
|
||||
{0xaa, 0x22, 0x00, 0xa0, 0x24, 0xa8, 0xbb, 0xac} \
|
||||
}
|
||||
|
||||
#define J2XINSERVERTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XINServer;1"
|
||||
|
||||
%}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XINServerTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XINServerTestComponent
|
||||
*
|
||||
* IID: 0x3b0e2d20-9852-11d4-aa22-00a024a8bbac
|
||||
*/
|
||||
|
||||
public interface iJ2XINServerTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("3b0e2d20-9852-11d4-aa22-00a024a8bbac");
|
||||
|
||||
|
||||
/* 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 (in short i); */
|
||||
public void testShort(short i);
|
||||
|
||||
/* void TestLong (in long i); */
|
||||
public void testLong(int i);
|
||||
|
||||
/* void TestLonglong (in long long i); */
|
||||
public void testLonglong(long i);
|
||||
|
||||
/* void TestByte (in octet i); */
|
||||
public void testByte(byte i);
|
||||
|
||||
/* void TestUShort (in unsigned short i); */
|
||||
public void testUShort(short i);
|
||||
|
||||
/* void TestULong (in unsigned long i); */
|
||||
public void testULong(int i);
|
||||
|
||||
/* void TestULonglong (in unsigned long long i); */
|
||||
public void testULonglong(long i);
|
||||
|
||||
/* void TestFloat (in float i); */
|
||||
public void testFloat(float i);
|
||||
|
||||
/* void TestDouble (in double i); */
|
||||
public void testDouble(double i);
|
||||
|
||||
/* void TestBoolean (in boolean i); */
|
||||
public void testBoolean(boolean i);
|
||||
|
||||
/* void TestString (in string i); */
|
||||
public void testString(String i);
|
||||
|
||||
/* void TestWString (in wstring i); */
|
||||
public void testWString(String i);
|
||||
|
||||
/* void TestStringArray (in unsigned long count, [array, size_is (count)] in string valueArray); */
|
||||
public void testStringArray(int count, String[] valueArray);
|
||||
|
||||
/* 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);
|
||||
|
||||
/* string GetTestObjectString (); */
|
||||
public String getTestObjectString();
|
||||
|
||||
/* void TestIID (in nsIIDRef iid); */
|
||||
public void testIID(IID iid);
|
||||
|
||||
/* void TestCID (in nsCIDRef cid); */
|
||||
public void testCID(CID cid);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
60
mozilla/java/xpcom/test/basic/params/J2XIN/cpp/makefile.win
Normal file
60
mozilla/java/xpcom/test/basic/params/J2XIN/cpp/makefile.win
Normal file
@@ -0,0 +1,60 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=..\..\..\..\..\..\..
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = J2XINServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XINServerTestComponent
|
||||
COMPONENT = 1
|
||||
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XINServerTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XINServerTestComponent.obj \
|
||||
.\$(OBJDIR)\J2XINServerTestComponentFactory.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>
|
||||
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\J2XIN*.xpt
|
||||
@@ -0,0 +1,2 @@
|
||||
f10e3970-9778-11d4-aa21-00a024a8bbac
|
||||
@mozilla/blackwood/blackconnect/test/params/J2XINClient;1
|
||||
@@ -0,0 +1,432 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class J2XINClientTestComponent implements iJ2XINClientTestComponent, iClientTestComponent, iJClientTestComponent, iExclusionSupport {
|
||||
private iJ2XINServerTestComponent server = null;
|
||||
private VarContainer varContainer = null;
|
||||
private String testLocation = null;
|
||||
private String logLocation = null;
|
||||
private Hashtable exclusionHash = new Hashtable();
|
||||
private StringBuffer buf, s;
|
||||
|
||||
public J2XINClientTestComponent() {
|
||||
System.out.println("DEbug:avm:J2XINClientTestComponent constructor");
|
||||
varContainer = new VarContainer();
|
||||
}
|
||||
|
||||
private void printResult(String res,String fileName) {
|
||||
try{
|
||||
DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/" + fileName));
|
||||
f.writeBytes(res);
|
||||
f.close();
|
||||
} catch(Exception e) {
|
||||
System.err.println("Exception during writing the file: " +e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void exclude(int count, String[] exclusionList) {
|
||||
System.out.println("DEbug:avm:J2XINClientTestComponent:exclude");
|
||||
for(int i=0;i<count;i++) {
|
||||
exclusionHash.put((Object)exclusionList[i],new Object());
|
||||
}
|
||||
}
|
||||
|
||||
/* void Initialize (in string serverProgID); */
|
||||
public void initialize(String serverProgID) {
|
||||
System.out.println("DEbug:avm:J2XINClientTestComponent:initialize");
|
||||
//Really code from tHack should be here!!
|
||||
}
|
||||
public void tHack(nsIComponentManager cm, String serverProgID) {
|
||||
System.out.println("DEbug:avm:J2XINClientTestComponent:tHack");
|
||||
nsIFactory factory = null;
|
||||
|
||||
if(cm == null) {
|
||||
System.out.println("DEbug:avm:ComponentManager is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
factory = cm.findFactory(J2XINServerCID);
|
||||
if(factory == null) {
|
||||
System.out.println("DEbug:avm:Factory is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
//System.err.println("IID="+iJ2XINServerTestComponent.IID);
|
||||
Object res = factory.createInstance(null, iJ2XINServerTestComponent.IID);
|
||||
// Object res = factory.createInstance(null, new IID("3b0e2d20-9852-11d4-aa22-00a024a8bbac"));
|
||||
if(res == null) {
|
||||
System.out.println("DEbug:avm:Instance is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
server = (iJ2XINServerTestComponent)res;
|
||||
if(server == null) {
|
||||
System.err.println("Create instance failed!! Server is NULLLLLLLLLLLLLLLLLLL");
|
||||
return;
|
||||
}
|
||||
String[] s2 = new String[1];
|
||||
String[] s1 = new String[1];
|
||||
server.getTestLocation(s2,s1);
|
||||
testLocation = s2[0];
|
||||
logLocation = s1[0];
|
||||
|
||||
}
|
||||
|
||||
/* void Execute (); */
|
||||
public void execute() {
|
||||
System.out.println("DEbug:avm:J2XINClientTestComponent:execute");
|
||||
if(server == null) {
|
||||
System.err.println("Server is not initialized!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
testLong();
|
||||
if(!exclusionHash.containsKey("longlong"))
|
||||
testLonglong();
|
||||
if(!exclusionHash.containsKey("octet"))
|
||||
testByte();
|
||||
if(!exclusionHash.containsKey("ushort"))
|
||||
testUShort();
|
||||
if(!exclusionHash.containsKey("ulong"))
|
||||
testULong();
|
||||
if(!exclusionHash.containsKey("ulonglong"))
|
||||
testULonglong();
|
||||
if(!exclusionHash.containsKey("float"))
|
||||
testFloat();
|
||||
if(!exclusionHash.containsKey("double"))
|
||||
testDouble();
|
||||
if(!exclusionHash.containsKey("boolean"))
|
||||
testBoolean();
|
||||
if(!exclusionHash.containsKey("string"))
|
||||
testString();
|
||||
if(!exclusionHash.containsKey("wstring"))
|
||||
testWString();
|
||||
if(!exclusionHash.containsKey("stringArray"))
|
||||
testStringArray();
|
||||
if(!exclusionHash.containsKey("longArray"))
|
||||
testLongArray();
|
||||
if(!exclusionHash.containsKey("charArray"))
|
||||
testCharArray();
|
||||
if(!exclusionHash.containsKey("object"))
|
||||
testObject();
|
||||
if(!exclusionHash.containsKey("mixed"))
|
||||
testMixed();
|
||||
if(!exclusionHash.containsKey("iid"))
|
||||
testIID();
|
||||
if(!exclusionHash.containsKey("cid"))
|
||||
testCID();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void testShort() {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
System.err.println("server.testShort");
|
||||
short shortVal = varContainer.getNextShort();
|
||||
while(shortVal != VarContainer.endOfData) {
|
||||
buf.append(shortVal + "\n");
|
||||
server.testShort(shortVal);
|
||||
shortVal = varContainer.getNextShort();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.short");
|
||||
server.flush("short");
|
||||
}
|
||||
|
||||
private void testLong() {
|
||||
System.err.println("server.testLong");
|
||||
buf = new StringBuffer("");
|
||||
int intVal = varContainer.getNextInt();
|
||||
while(intVal != VarContainer.endOfData) {
|
||||
buf.append(intVal + "\n");
|
||||
server.testLong(intVal);
|
||||
intVal = varContainer.getNextInt();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.long");
|
||||
server.flush("long");
|
||||
}
|
||||
|
||||
private void testLonglong() {
|
||||
System.err.println("server.testLonglong");
|
||||
buf = new StringBuffer("");
|
||||
long longVal = varContainer.getNextLong();
|
||||
while(longVal != VarContainer.endOfData) {
|
||||
buf.append(longVal + "\n");
|
||||
server.testLonglong(longVal);
|
||||
longVal = varContainer.getNextLong();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.longlong");
|
||||
server.flush("longlong");
|
||||
}
|
||||
|
||||
private void testByte() {
|
||||
buf = new StringBuffer("");
|
||||
byte byteVal = varContainer.getNextByte();
|
||||
while(byteVal != VarContainer.endOfData) {
|
||||
buf.append(byteVal + "\n");
|
||||
server.testByte(byteVal);
|
||||
byteVal = varContainer.getNextByte();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.octet");
|
||||
server.flush("octet");
|
||||
}
|
||||
|
||||
private void testUShort() {
|
||||
buf = new StringBuffer("");
|
||||
short ushortVal = varContainer.getNextUshort();
|
||||
while(ushortVal != VarContainer.endOfData) {
|
||||
buf.append(ushortVal + "\n");
|
||||
server.testUShort(ushortVal);
|
||||
ushortVal = varContainer.getNextUshort();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.ushort");
|
||||
server.flush("ushort");
|
||||
}
|
||||
|
||||
private void testULong() {
|
||||
buf = new StringBuffer("");
|
||||
int uintVal = varContainer.getNextUint();
|
||||
while(uintVal != VarContainer.endOfData) {
|
||||
buf.append(uintVal + "\n");
|
||||
server.testULong(uintVal);
|
||||
uintVal = varContainer.getNextUint();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.ulong");
|
||||
server.flush("ulong");
|
||||
}
|
||||
|
||||
private void testULonglong() {
|
||||
buf = new StringBuffer("");
|
||||
long ulongVal = varContainer.getNextUlong();
|
||||
while(ulongVal != VarContainer.endOfData) {
|
||||
buf.append(ulongVal + "\n");
|
||||
server.testULonglong(ulongVal);
|
||||
ulongVal = varContainer.getNextUlong();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.ulonglong");
|
||||
server.flush("ulonglong");
|
||||
}
|
||||
|
||||
private void testFloat() {
|
||||
buf = new StringBuffer("");
|
||||
float floatVal = varContainer.getNextFloat();
|
||||
while(floatVal != VarContainer.endOfData) {
|
||||
buf.append(floatVal + "\n");
|
||||
server.testFloat(floatVal);
|
||||
floatVal = varContainer.getNextFloat();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.float");
|
||||
server.flush("float");
|
||||
}
|
||||
|
||||
private void testDouble() {
|
||||
buf = new StringBuffer("");
|
||||
double doubleVal = varContainer.getNextDouble();
|
||||
while(doubleVal != VarContainer.endOfData) {
|
||||
buf.append(doubleVal + "\n");
|
||||
server.testDouble(doubleVal);
|
||||
doubleVal = varContainer.getNextDouble();
|
||||
}
|
||||
printResult(buf.toString(),"j2x.in.client.double");
|
||||
server.flush("double");
|
||||
}
|
||||
|
||||
private void testBoolean() {
|
||||
server.testBoolean(true);
|
||||
server.testBoolean(false);
|
||||
printResult("true\nfalse","j2x.in.client.boolean");
|
||||
server.flush("boolean");
|
||||
}
|
||||
|
||||
// private void testChar() {
|
||||
// server.testChar('S');
|
||||
// server.testWChar(VarContainer.charVar);
|
||||
// printResult("S","j2x.in.client.char");
|
||||
// server.flush("char");
|
||||
// }
|
||||
|
||||
private void testString() {
|
||||
printResult(VarContainer.charPVar,"j2x.in.client.string");
|
||||
server.testString(VarContainer.charPVar);
|
||||
server.flush("string");
|
||||
}
|
||||
|
||||
private void testWString() {
|
||||
printResult(VarContainer.unicharPVar,"j2x.in.client.wstring");
|
||||
server.testWString(VarContainer.unicharPVar);
|
||||
server.flush("wstring");
|
||||
}
|
||||
|
||||
private void testStringArray() {
|
||||
String[] valueArray = {"fist string", "second string", "some string","Sample string 1","S","String SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"};
|
||||
int count = valueArray.length;
|
||||
s = new StringBuffer();
|
||||
for(int i=0;i<count;i++) {
|
||||
s.append(valueArray[i]+"\n");
|
||||
}
|
||||
printResult(s.toString(),"j2x.in.client.stringArray");
|
||||
server.testStringArray(count, valueArray);
|
||||
}
|
||||
|
||||
private void testLongArray() {
|
||||
int[] intArray = {1,2,201,-6,86,-10000};
|
||||
s = new StringBuffer();
|
||||
for(int i=0;i<intArray.length;i++) {
|
||||
s.append(intArray[i]+"\n");
|
||||
}
|
||||
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();
|
||||
for(int i=0;i<charArray.length;i++) {
|
||||
s.append(charArray[i]+"\n");
|
||||
}
|
||||
printResult(s.toString(),"j2x.in.client.charArray");
|
||||
server.testCharArray(charArray.length, charArray);
|
||||
}
|
||||
|
||||
private void testMixed() {
|
||||
boolean bBool = true;
|
||||
char cChar = '0';
|
||||
byte nByte = VarContainer.byteMid;
|
||||
short nShort = VarContainer.shortMid;
|
||||
short nUShort = VarContainer.ushortMid;
|
||||
int nLong = VarContainer.intMid;
|
||||
int nULong = VarContainer.uintMid;
|
||||
long nHyper = VarContainer.longMid;
|
||||
long nUHyper = VarContainer.ulongMid;
|
||||
float fFloat = VarContainer.floatMid;
|
||||
double fDouble = VarContainer.doubleMid;
|
||||
String aString = "Mixed string";
|
||||
int[] intArray = {1,2,201,-6,86,-10000};
|
||||
|
||||
s = new StringBuffer();
|
||||
s.append(bBool + "\n");
|
||||
s.append(cChar + "\n");
|
||||
s.append(nByte + "\n");
|
||||
s.append(nShort + "\n");
|
||||
s.append(nUShort + "\n");
|
||||
s.append(nLong + "\n");
|
||||
s.append(nULong + "\n");
|
||||
s.append(nHyper + "\n");
|
||||
s.append(nUHyper + "\n");
|
||||
s.append(fFloat + "\n");
|
||||
s.append(fDouble + "\n");
|
||||
s.append(aString + "\n");
|
||||
for(int j=0;j<intArray.length;j++)
|
||||
s.append(intArray[j] + "\n");
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
private void testIID() {
|
||||
buf = new StringBuffer("");
|
||||
IID iid=new IID("cc7480e0-3a37-11d5-b653-005004552ed1");
|
||||
buf.append(iid + "\n");
|
||||
|
||||
server.testIID(iid);
|
||||
printResult(buf.toString(),"j2x.in.client.iid");
|
||||
server.flush("iid");
|
||||
}
|
||||
|
||||
private void testCID() {
|
||||
buf = new StringBuffer("");
|
||||
CID cid=new CID("cc7480e0-3a37-11d5-b653-005004552ed1");
|
||||
buf.append(cid + "\n");
|
||||
|
||||
server.testCID(cid);
|
||||
printResult(buf.toString(),"j2x.in.client.cid");
|
||||
server.flush("cid");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Object queryInterface(IID iid) {
|
||||
System.out.println("DEbug:avm:J2XINClientTestComponent::queryInterface iid="+iid);
|
||||
if ( iid.equals(nsISupports.IID)
|
||||
|| iid.equals(iJ2XINClientTestComponent.IID)||iid.equals(iClientTestComponent.IID)
|
||||
||iid.equals(iExclusionSupport.IID)) {
|
||||
return this;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static CID J2XINServerCID = new CID("1ddc5b10-9852-11d4-aa22-00a024a8bbac");
|
||||
// static IID iJ2XINClientTestComponentIID = new IID(iJ2XINClientTestComponent.IID);
|
||||
// static IID iClientTestComponentIID = new IID(iClientTestComponent.IID);
|
||||
// static IID iJ2XINServerIID = new IID(iJ2XINServerTestComponent.IID);
|
||||
// static IID nsISupportsIID = new IID(nsISupports.IID);
|
||||
// static IID nsIComponentManagerIID = new IID(nsIComponentManager.IID);
|
||||
// static IID iExclusionSupportIID = new IID(iExclusionSupport.IID);
|
||||
// */
|
||||
static {
|
||||
try {
|
||||
|
||||
System.out.println("J2XINClientTestComponent - static block ");
|
||||
Class nsIComponentManagerClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIComponentManager");
|
||||
InterfaceRegistry.register(nsIComponentManagerClass);
|
||||
Class proxyHandlerClass =
|
||||
Class.forName("org.mozilla.xpcom.ProxyHandler");
|
||||
InterfaceRegistry.register(proxyHandlerClass);
|
||||
Class nsIFileClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFile");
|
||||
InterfaceRegistry.register(nsIFileClass);
|
||||
Class nsIFactoryClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFactory");
|
||||
InterfaceRegistry.register(nsIFactoryClass);
|
||||
Class nsIEnumeratorClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIEnumerator");
|
||||
InterfaceRegistry.register(nsIEnumeratorClass);
|
||||
System.out.println("DE bug:avm:before registeringiJ2XINServerTestComponent ");
|
||||
Class iJ2XINServerTestComponentClass =
|
||||
Class.forName("org.mozilla.xpcom.iJ2XINServerTestComponent");
|
||||
InterfaceRegistry.register(iJ2XINServerTestComponentClass);
|
||||
} catch (Exception e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################EXCEPTION during interface initialization############");
|
||||
System.err.println(e);
|
||||
} catch (Error e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################Error during interface initialization############");
|
||||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
mozilla/java/xpcom/test/basic/params/J2XIN/java/Makefile.in
Normal file
57
mozilla/java/xpcom/test/basic/params/J2XIN/java/Makefile.in
Normal file
@@ -0,0 +1,57 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
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
|
||||
$(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)
|
||||
|
||||
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
|
||||
@@ -0,0 +1,47 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iClientTestComponent.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(3d293210-9779-11d4-aa21-00a024a8bbac)]
|
||||
interface iJ2XINClientTestComponent : nsISupports
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
#define J2XINCLIENTTESTCOMPONENT_CID \
|
||||
{ /*f10e3970-9778-11d4-aa21-00a024a8bbac*/ \
|
||||
0xf10e3970, \
|
||||
0x9778, \
|
||||
0x11d4, \
|
||||
{0xaa, 0x21, 0x00, 0xa0, 0x24, 0xa8, 0xbb, 0xac} \
|
||||
}
|
||||
|
||||
#define J2XINCLIENTTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XINClient;1"
|
||||
|
||||
%}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XINClientTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XINClientTestComponent
|
||||
*
|
||||
* IID: 0x3d293210-9779-11d4-aa21-00a024a8bbac
|
||||
*/
|
||||
|
||||
public interface iJ2XINClientTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("3d293210-9779-11d4-aa21-00a024a8bbac");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
68
mozilla/java/xpcom/test/basic/params/J2XIN/java/makefile.win
Normal file
68
mozilla/java/xpcom/test/basic/params/J2XIN/java/makefile.win
Normal file
@@ -0,0 +1,68 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..\..
|
||||
topsrcdir = ..\..\..\..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XINClientTestComponent
|
||||
COMPONENT=1
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
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:
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes $(JAVA_SRC)
|
||||
|
||||
J2XINClientTestComponent.jar.comp: manifest J2XINClientTestComponent.class
|
||||
$(JDKHOME)\bin\jar cvfm J2XINClientTestComponent.jar.comp manifest *.class
|
||||
|
||||
install-component: J2XINClientTestComponent.jar.comp J2XINClientTestComponent.jar.info $(DLL)
|
||||
copy J2XINClientTestComponent.jar* $(DIST)\bin\components
|
||||
|
||||
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
|
||||
1
mozilla/java/xpcom/test/basic/params/J2XIN/java/manifest
Normal file
1
mozilla/java/xpcom/test/basic/params/J2XIN/java/manifest
Normal file
@@ -0,0 +1 @@
|
||||
Component-Class: J2XINClientTestComponent
|
||||
31
mozilla/java/xpcom/test/basic/params/J2XIN/makefile.win
Normal file
31
mozilla/java/xpcom/test/basic/params/J2XIN/makefile.win
Normal file
@@ -0,0 +1,31 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
cpp \
|
||||
java \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
35
mozilla/java/xpcom/test/basic/params/J2XINOUT/Makefile.in
Normal file
35
mozilla/java/xpcom/test/basic/params/J2XINOUT/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
@@ -0,0 +1,270 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "plstr.h"
|
||||
#include "stdio.h"
|
||||
#include "nsMemory.h"
|
||||
#include "BCTest.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include "J2XINOUTServerTestComponent.h"
|
||||
#include "prmem.h"
|
||||
#include "prenv.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringUtil.h"
|
||||
|
||||
char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* fBuffer=NULL;
|
||||
PRUint8 end_of_data = 112;
|
||||
int all=0;
|
||||
|
||||
|
||||
J2XINOUTServerTestComponentImpl::J2XINOUTServerTestComponentImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
testLocation=PR_GetEnv(BC_TEST_LOCATION_VAR_NAME);
|
||||
logLocation=PR_GetEnv(BC_LOG_LOCATION_VAR_NAME);
|
||||
if((testLocation == NULL)||(logLocation == NULL)) {
|
||||
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");
|
||||
}
|
||||
|
||||
J2XINOUTServerTestComponentImpl::~J2XINOUTServerTestComponentImpl()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(J2XINOUTServerTestComponentImpl, iJ2XINOUTServerTestComponent);
|
||||
IMPL_PROCEED_RESULTS(J2XINOUTServerTestComponentImpl)
|
||||
IMPL_VAR_STACKS(J2XINOUTServerTestComponentImpl)
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::GetTestLocation(char **tLocation, char **lLocation) {
|
||||
*tLocation = testLocation;
|
||||
*lLocation = logLocation;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::Flush(const char *type) {
|
||||
char* fileName = NULL;
|
||||
|
||||
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 {
|
||||
}
|
||||
all=0;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//Test methods
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestShort(PRInt16 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
else Flush("short");
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLong(PRInt32 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
else Flush("long");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLonglong(PRInt64 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%lld\n",*i);
|
||||
else Flush("longlong");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestUShort(PRUint16 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%d\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);
|
||||
else Flush("ulong");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestULonglong(PRUint64 *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%lld\n",*i);
|
||||
else Flush("ulonglong");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestFloat(float *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",*i);
|
||||
else Flush("float");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestDouble(double *i) {
|
||||
if (*i!=112) fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",*i);
|
||||
else Flush("double");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestBoolean(PRBool *i) {
|
||||
if (*i==PR_TRUE) fBuffer = PR_sprintf_append(fBuffer,"%s\n","true");
|
||||
else if (*i==PR_FALSE) fBuffer = PR_sprintf_append(fBuffer,"%s\n","false");
|
||||
else fBuffer = PR_sprintf_append(fBuffer,"%s\n","strange value");
|
||||
all++;
|
||||
if (all==2) Flush("boolean");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
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");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestWString(PRUnichar **i) {
|
||||
|
||||
nsString str = *(new nsString(*i));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf,str,100)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
}
|
||||
all++;
|
||||
if (all==3) Flush("wstring");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestStringArray(PRUint32 count, char ***valueArray) {
|
||||
for(int i=0;i<count;i++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",valueArray[0][i]);
|
||||
Flush("stringArray");
|
||||
return NS_OK;//PrintResultArray("j2x.in.server.stringArray",count,valueArray);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestLongArray(PRUint32 count, PRInt32 **longArray) {
|
||||
for(int i=0;i<count;i++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",longArray[i]);
|
||||
Flush("longArray");
|
||||
return NS_OK;//PrintResultArray("j2x.in.server.longArray",count,longArray);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestCharArray(PRUint32 count, char **valueArray) {
|
||||
for(int i=0;i<count;i++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",valueArray[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::TestObj() {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"!!!Right string!!!");
|
||||
Flush("object");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP J2XINOUTServerTestComponentImpl::TestObj2() {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"!!!Right string!!!");
|
||||
|
||||
char* fileName = NULL;
|
||||
|
||||
fileName = PR_sprintf_append(fileName,"j2x.inout.xclient.object");
|
||||
if(fBuffer) {
|
||||
PrintResult(fileName,fBuffer);
|
||||
PR_smprintf_free(fBuffer);
|
||||
fBuffer = NULL;
|
||||
} else {
|
||||
}
|
||||
PR_smprintf_free(fileName);
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iJ2XINOUTServerTestComponent.h"
|
||||
#include "ProceedResults.h"
|
||||
#include "VarContainer.h"
|
||||
|
||||
class J2XINOUTServerTestComponentImpl : public iJ2XINOUTServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XINOUTSERVERTESTCOMPONENT
|
||||
DECL_PROCEED_RESULTS
|
||||
DECL_VAR_STACKS
|
||||
|
||||
J2XINOUTServerTestComponentImpl();
|
||||
virtual ~J2XINOUTServerTestComponentImpl();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class _MYCLASS_ : public iJ2XINOUTServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XINOUTSERVERTESTCOMPONENT
|
||||
|
||||
_MYCLASS_();
|
||||
virtual ~_MYCLASS_();
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "J2XINOUTServerTestComponent.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(J2XINOUTServerTestComponentImpl)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "J2XINOUT Server Test Component", J2XINOUTSERVERTESTCOMPONENT_CID, J2XINOUTSERVERTESTCOMPONENT_PROGID, J2XINOUTServerTestComponentImplConstructor,
|
||||
NULL /* NULL if you dont need one */,
|
||||
NULL /* NULL if you dont need one */
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("J2XINOUTServerTestComponentFactory", components)
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XINOUTServerTestComponent
|
||||
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) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
J2XINOUTServerTestComponent.cpp \
|
||||
J2XINOUTServerTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XINOUTServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XINOUTServerTestComponent.java
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
@@ -0,0 +1,72 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(c534e01c-9567-44ac-aaa6-f908fabefc2b)]
|
||||
interface iJ2XINOUTServerTestComponent : nsISupports
|
||||
{
|
||||
void GetTestLocation(out string tLocation, out string lLocation);
|
||||
void Flush(in string s);
|
||||
void TestShort(inout short i);
|
||||
void TestLong(inout long i);
|
||||
void TestLonglong(inout long long i);
|
||||
void TestByte(inout octet i);
|
||||
void TestUShort(inout unsigned short i);
|
||||
void TestULong(inout unsigned long i);
|
||||
void TestULonglong(inout unsigned long long i);
|
||||
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,
|
||||
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);
|
||||
void TestObj();
|
||||
void TestObj2();
|
||||
};
|
||||
|
||||
%{ C++
|
||||
#define J2XINOUTSERVERTESTCOMPONENT_CID \
|
||||
{ /*4aa238d4-d655-40b7-9743-62a5b2e21a5c*/ \
|
||||
0x4aa238d4, \
|
||||
0xd655, \
|
||||
0x40b7, \
|
||||
{0x97, 0x43, 0x62, 0xa5, 0xb2, 0xe2, 0x1a, 0x5c} \
|
||||
}
|
||||
|
||||
#define J2XINOUTSERVERTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XINOUTServer;1"
|
||||
|
||||
%}
|
||||
@@ -0,0 +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
|
||||
*/
|
||||
@@ -0,0 +1,58 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=..\..\..\..\..\..\..
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = J2XINOUTServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XINOUTServerTestComponent
|
||||
COMPONENT = 1
|
||||
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XINOUTServerTestComponent.obj \
|
||||
.\$(OBJDIR)\J2XINOUTServerTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = .\iJ2XINOUTServerTestComponent.idl
|
||||
|
||||
JAVAI= iJ2XINOUTServerTestComponent.java
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
|
||||
JAVAC=$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\J2XINOUT*.xpt
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
1a7ecb30-6a68-4894-943f-e227bebf3861
|
||||
@mozilla/blackwood/blackconnect/test/params/J2XINOUTClient;1
|
||||
@@ -0,0 +1,678 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class J2XINOUTClientTestComponent implements iJ2XINOUTClientTestComponent, iClientTestComponent, iJClientTestComponent, iExclusionSupport {
|
||||
private iJ2XINOUTServerTestComponent server = null;
|
||||
private String testLocation = null;
|
||||
private String logLocation = null;
|
||||
private Hashtable exclusionHash = new Hashtable();
|
||||
private byte endOfData = 112;
|
||||
|
||||
|
||||
public J2XINOUTClientTestComponent() {
|
||||
System.out.println("DEbug:avm:J2XINOUTClientTestComponent constructor");
|
||||
}
|
||||
|
||||
private void printResult(String res,String fileName) {
|
||||
try{
|
||||
DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/" + fileName));
|
||||
f.writeBytes(res);
|
||||
f.close();
|
||||
} catch(Exception e) {
|
||||
System.err.println("Exception during writing the file: " +e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void initialize(String serverProgID) {
|
||||
|
||||
System.out.println("DEbug:avm:J2XINOUTClientTestComponent:initialize");
|
||||
//Really code from tHack should be here!!
|
||||
}
|
||||
public void exclude(int count, String[] exclusionList) {
|
||||
System.out.println("DEbug:avm:J2XINOUTClientTestComponent:exclude");
|
||||
for(int i=0;i<count;i++) {
|
||||
exclusionHash.put((Object)exclusionList[i],new Object());
|
||||
}
|
||||
}
|
||||
public void tHack(nsIComponentManager cm, String serverProgID) {
|
||||
System.out.println("DEbug:avm:J2XINOUTClientTestComponent:tHack");
|
||||
nsIFactory factory = null;
|
||||
|
||||
if(cm == null) {
|
||||
System.out.println("DEbug:avm:ComponentManager is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
factory = cm.findFactory(J2XINOUTServerCID);
|
||||
if(factory == null) {
|
||||
System.out.println("DEbug:avm:Factory is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
Object res = factory.createInstance(null, iJ2XINOUTServerTestComponent.IID);
|
||||
if(res == null) {
|
||||
System.out.println("DEbug:avm:Instance is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
server = (iJ2XINOUTServerTestComponent)res;
|
||||
if(server == null) {
|
||||
System.err.println("Create instance failed!! Server is NULLLLLLLLLLLLLLLLLLL");
|
||||
return;
|
||||
}
|
||||
|
||||
String[] ss = new String[1];
|
||||
String[] sss = new String[1];
|
||||
server.getTestLocation(ss,sss);
|
||||
testLocation = ss[0];
|
||||
logLocation = sss[0];
|
||||
}
|
||||
|
||||
/* void Execute (); */
|
||||
public void execute() {
|
||||
System.out.println("DEbug:avm:J2XINOUTClientTestComponent:execute");
|
||||
if(server == null) {
|
||||
System.err.println("Server is not initialized!!!");
|
||||
return;
|
||||
}
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
testLong();
|
||||
if(!exclusionHash.containsKey("longlong"))
|
||||
testLonglong();
|
||||
if(!exclusionHash.containsKey("octet"))
|
||||
testByte();
|
||||
if(!exclusionHash.containsKey("ushort"))
|
||||
testUShort();
|
||||
if(!exclusionHash.containsKey("ulong"))
|
||||
testULong();
|
||||
if(!exclusionHash.containsKey("ulonglong"))
|
||||
testULonglong();
|
||||
if(!exclusionHash.containsKey("float"))
|
||||
testFloat();
|
||||
if(!exclusionHash.containsKey("double"))
|
||||
testDouble();
|
||||
if(!exclusionHash.containsKey("boolean"))
|
||||
testBoolean();
|
||||
if(!exclusionHash.containsKey("string"))
|
||||
testString();
|
||||
if(!exclusionHash.containsKey("wstring"))
|
||||
testWString();
|
||||
if(!exclusionHash.containsKey("stringArray"))
|
||||
testStringArray();
|
||||
if(!exclusionHash.containsKey("longArray"))
|
||||
testLongArray();
|
||||
if(!exclusionHash.containsKey("charArray"))
|
||||
testCharArray();
|
||||
if(!exclusionHash.containsKey("object"))
|
||||
testObject();
|
||||
if(!exclusionHash.containsKey("mixed"))
|
||||
testMixed();
|
||||
}
|
||||
|
||||
private void testShort() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testShort");
|
||||
short[] shortVar = new short[1];
|
||||
|
||||
shortVar[0]=java.lang.Short.MIN_VALUE;
|
||||
s.append(shortVar[0]+"\n");
|
||||
server.testShort(shortVar);
|
||||
s2.append(shortVar[0]+"\n");
|
||||
shortVar[0]=0;
|
||||
s.append(shortVar[0]+"\n");
|
||||
server.testShort(shortVar);
|
||||
s2.append(shortVar[0]+"\n");
|
||||
shortVar[0]=VarContainer.shortVar;
|
||||
s.append(shortVar[0]+"\n");
|
||||
server.testShort(shortVar);
|
||||
s2.append(shortVar[0]+"\n");
|
||||
shortVar[0]=java.lang.Short.MAX_VALUE;
|
||||
s.append(shortVar[0]+"\n");
|
||||
server.testShort(shortVar);
|
||||
s2.append(shortVar[0]+"\n");
|
||||
shortVar[0]=112;
|
||||
server.testShort(shortVar);
|
||||
printResult(s.toString(),"j2x.inout.client.short");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.short");
|
||||
}
|
||||
|
||||
private void testLong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testLong");
|
||||
int[] intVar = new int[1];
|
||||
intVar[0]=java.lang.Integer.MIN_VALUE;
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
s2.append(intVar[0]+"\n");
|
||||
intVar[0]=0;
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
s2.append(intVar[0]+"\n");
|
||||
intVar[0]=1000;//VarContainer.intVar;
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
s2.append(intVar[0]+"\n");
|
||||
intVar[0]=java.lang.Integer.MAX_VALUE;
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
s2.append(intVar[0]+"\n");
|
||||
intVar[0]=112;
|
||||
server.testLong(intVar);
|
||||
printResult(s.toString(),"j2x.inout.client.long");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.long");
|
||||
}
|
||||
|
||||
private void testLonglong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
|
||||
System.err.println("server.testLonglong");
|
||||
long[] longVar = new long[1];
|
||||
|
||||
longVar[0]=java.lang.Long.MIN_VALUE;
|
||||
s.append(longVar[0]+"\n");
|
||||
server.testLonglong(longVar);
|
||||
s2.append(longVar[0]+"\n");
|
||||
longVar[0]=0;
|
||||
s.append(longVar[0]+"\n");
|
||||
server.testLonglong(longVar);
|
||||
s2.append(longVar[0]+"\n");
|
||||
longVar[0]=VarContainer.longVar;
|
||||
s.append(longVar[0]+"\n");
|
||||
server.testLonglong(longVar);
|
||||
s2.append(longVar[0]+"\n");
|
||||
longVar[0]=java.lang.Long.MAX_VALUE;
|
||||
s.append(longVar[0]+"\n");
|
||||
server.testLonglong(longVar);
|
||||
s2.append(longVar[0]+"\n");
|
||||
longVar[0]=112;
|
||||
server.testLonglong(longVar);
|
||||
printResult(s.toString(),"j2x.inout.client.longlong");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.longlong");
|
||||
}
|
||||
|
||||
private void testByte() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testByte");
|
||||
byte[] byteVar = new byte[1];
|
||||
|
||||
byteVar[0]=java.lang.Byte.MIN_VALUE;
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
s2.append(byteVar[0]+"\n");
|
||||
byteVar[0]=0;
|
||||
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;
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
s2.append(byteVar[0]+"\n");
|
||||
byteVar[0]=112;
|
||||
server.testByte(byteVar);
|
||||
printResult(s.toString(),"j2x.inout.client.octet");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.octet");
|
||||
}
|
||||
|
||||
|
||||
private void testUShort() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testUShort");
|
||||
short[] ushortVar = new short[1];
|
||||
|
||||
ushortVar[0]=0;
|
||||
s.append(ushortVar[0]+"\n");
|
||||
server.testUShort(ushortVar);
|
||||
s2.append(ushortVar[0]+"\n");
|
||||
ushortVar[0]=1000;//VarContainer.unsignedShortVar;
|
||||
s.append(ushortVar[0]+"\n");
|
||||
server.testUShort(ushortVar);
|
||||
s2.append(ushortVar[0]+"\n");
|
||||
ushortVar[0]=java.lang.Short.MAX_VALUE;
|
||||
s.append(ushortVar[0]+"\n");
|
||||
server.testUShort(ushortVar);
|
||||
s2.append(ushortVar[0]+"\n");
|
||||
ushortVar[0]=112;
|
||||
server.testUShort(ushortVar);
|
||||
printResult(s.toString(),"j2x.inout.client.ushort");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.ushort");
|
||||
}
|
||||
|
||||
private void testULong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testUlong");
|
||||
int[] uintVar = new int[1];
|
||||
|
||||
uintVar[0]=0;
|
||||
s.append(uintVar[0]+"\n");
|
||||
server.testULong(uintVar);
|
||||
s2.append(uintVar[0]+"\n");
|
||||
uintVar[0]=1000;//VarContainer.unsignedIntVar;
|
||||
s.append(uintVar[0]+"\n");
|
||||
server.testULong(uintVar);
|
||||
s2.append(uintVar[0]+"\n");
|
||||
uintVar[0]=java.lang.Integer.MAX_VALUE;
|
||||
s.append(uintVar[0]+"\n");
|
||||
server.testULong(uintVar);
|
||||
s2.append(uintVar[0]+"\n");
|
||||
uintVar[0]=112;
|
||||
server.testULong(uintVar);
|
||||
printResult(s.toString(),"j2x.inout.client.ulong");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.ulong");
|
||||
}
|
||||
|
||||
private void testULonglong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testULonglong");
|
||||
long[] ulongVar = new long[1];
|
||||
|
||||
ulongVar[0]=0;
|
||||
s.append(ulongVar[0]+"\n");
|
||||
server.testULonglong(ulongVar);
|
||||
s2.append(ulongVar[0]+"\n");
|
||||
ulongVar[0]=VarContainer.unsignedLongVar;
|
||||
s.append(ulongVar[0]+"\n");
|
||||
server.testULonglong(ulongVar);
|
||||
s2.append(ulongVar[0]+"\n");
|
||||
ulongVar[0]=java.lang.Long.MAX_VALUE;
|
||||
s.append(ulongVar[0]+"\n");
|
||||
server.testULonglong(ulongVar);
|
||||
s2.append(ulongVar[0]+"\n");
|
||||
ulongVar[0]=112;
|
||||
server.testULonglong(ulongVar);
|
||||
printResult(s.toString(),"j2x.inout.client.ulonglong");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.ulonglong");
|
||||
}
|
||||
private void testFloat() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testFloat");
|
||||
float[] floatVar = new float[1];
|
||||
|
||||
floatVar[0]=java.lang.Float.MIN_VALUE;
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
s2.append(floatVar[0]+"\n");
|
||||
floatVar[0]=0;
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
s2.append(floatVar[0]+"\n");
|
||||
floatVar[0]=1000;//VarContainer.floatVar;
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
s2.append(floatVar[0]+"\n");
|
||||
floatVar[0]=java.lang.Float.MAX_VALUE;
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
s2.append(floatVar[0]+"\n");
|
||||
floatVar[0]=112;
|
||||
server.testFloat(floatVar);
|
||||
printResult(s.toString(),"j2x.inout.client.float");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.float");
|
||||
}
|
||||
private void testDouble() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testDouble");
|
||||
double[] doubleVar = new double[1];
|
||||
|
||||
doubleVar[0]=java.lang.Double.MIN_VALUE;
|
||||
s.append(doubleVar[0]+"\n");
|
||||
server.testDouble(doubleVar);
|
||||
s2.append(doubleVar[0]+"\n");
|
||||
doubleVar[0]=0;
|
||||
s.append(doubleVar[0]+"\n");
|
||||
server.testDouble(doubleVar);
|
||||
s2.append(doubleVar[0]+"\n");
|
||||
doubleVar[0]=VarContainer.doubleVar;
|
||||
s.append(doubleVar[0]+"\n");
|
||||
server.testDouble(doubleVar);
|
||||
s2.append(doubleVar[0]+"\n");
|
||||
doubleVar[0]=java.lang.Double.MAX_VALUE;
|
||||
s.append(doubleVar[0]+"\n");
|
||||
server.testDouble(doubleVar);
|
||||
s2.append(doubleVar[0]+"\n");
|
||||
doubleVar[0]=112;
|
||||
server.testDouble(doubleVar);
|
||||
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.double");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.double");
|
||||
}
|
||||
|
||||
|
||||
private void testBoolean() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testBoolean");
|
||||
boolean[] boolVar = new boolean[1];
|
||||
|
||||
boolVar[0]=true;
|
||||
s.append(boolVar[0]+"\n");
|
||||
server.testBoolean(boolVar);
|
||||
s2.append(boolVar[0]+"\n");
|
||||
boolVar[0]=false;
|
||||
s.append(boolVar[0]+"\n");
|
||||
server.testBoolean(boolVar);
|
||||
s2.append(boolVar[0]+"\n");
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.boolean");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.boolean");
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testString");
|
||||
String[] stringVar = new String[1];
|
||||
|
||||
stringVar[0]="111";//VarContainer.charPVar;
|
||||
s.append(stringVar[0]+"\n");
|
||||
server.testString(stringVar);
|
||||
s2.append(stringVar[0]+"\n");
|
||||
stringVar[0]="";
|
||||
s.append(stringVar[0]+"\n");
|
||||
server.testString(stringVar);
|
||||
s2.append(stringVar[0]+"\n");
|
||||
stringVar[0]="NULL string";
|
||||
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();
|
||||
System.err.println("server.testWString");
|
||||
String[] wstringVar = new String[1];
|
||||
|
||||
wstringVar[0]="111";//VarContainer.unicharPVar;
|
||||
s.append(wstringVar[0]+"\n");
|
||||
server.testWString(wstringVar);
|
||||
s2.append(wstringVar[0]+"\n");
|
||||
wstringVar[0]="";
|
||||
s.append(wstringVar[0]+"\n");
|
||||
server.testWString(wstringVar);
|
||||
s2.append(wstringVar[0]+"\n");
|
||||
wstringVar[0]="NULL string";
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
private void testStringArray() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testStringArray");
|
||||
String[][] stringAVar = new String[1][3];
|
||||
|
||||
stringAVar[0][0]="iddqd";
|
||||
stringAVar[0][1]="idkfa";
|
||||
stringAVar[0][2]="ctrl-q";
|
||||
int count=3;
|
||||
for(int i=0;i<count;i++)
|
||||
s.append(stringAVar[0][i]+"\n");
|
||||
server.testStringArray(count,stringAVar);
|
||||
for(int i=0;i<count;i++)
|
||||
s2.append(stringAVar[0][i]+"\n");
|
||||
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.stringArray");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.stringArray");
|
||||
}
|
||||
|
||||
|
||||
private void testLongArray() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testLongArray");
|
||||
int[][] intAVar = new int[1][3];
|
||||
|
||||
intAVar[0][0]=777;
|
||||
intAVar[0][1]=888;
|
||||
intAVar[0][2]=999;
|
||||
int count=3;
|
||||
for(int i=0;i<count;i++)
|
||||
s.append(intAVar[0][i]+"\n");
|
||||
server.testLongArray(count,intAVar);
|
||||
for(int i=0;i<count;i++)
|
||||
s2.append(intAVar[0][i]+"\n");
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.longArray");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.longArray");
|
||||
}
|
||||
|
||||
private void testCharArray () {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testCharArray");
|
||||
char[][] charAVar = new char[1][3];
|
||||
|
||||
charAVar[0][0]='k';
|
||||
charAVar[0][1]='f';
|
||||
charAVar[0][2]='a';
|
||||
int count=3;
|
||||
for(int i=0;i<count;i++)
|
||||
s.append(charAVar[0][i]+"\n");
|
||||
server.testCharArray(count,charAVar);
|
||||
for(int i=0;i<count;i++)
|
||||
s2.append(charAVar[0][i]+"\n");
|
||||
|
||||
|
||||
printResult(s.toString(),"j2x.inout.client.charArray");
|
||||
printResult(s2.toString(),"j2x.inout.xclient.charArray");
|
||||
}
|
||||
|
||||
private void testMixed() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
StringBuffer s2 = new StringBuffer();
|
||||
System.err.println("server.testMixed");
|
||||
|
||||
short[] shortVar=new short[1];
|
||||
int[] intVar=new int[1];
|
||||
long[] longVar=new long[1];
|
||||
byte[] byteVar=new byte[1];
|
||||
short[] ushortVar=new short[1];
|
||||
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;
|
||||
longVar[0]=VarContainer.longVar;
|
||||
byteVar[0]=VarContainer.unsignedByteVar;
|
||||
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"+
|
||||
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");
|
||||
|
||||
server.testMixed(boolVar, charVar, byteVar, shortVar, ushortVar,
|
||||
intVar, uintVar, longVar, ulongVar, floatVar,
|
||||
doubleVar, stringVar, count, intAVar);
|
||||
|
||||
s2.append(boolVar[0]+"\n"+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");
|
||||
|
||||
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);
|
||||
if ( iid.equals(nsISupports.IID)
|
||||
|| iid.equals(iJ2XINOUTClientTestComponent.IID)||iid.equals(iClientTestComponent.IID)||iid.equals(iExclusionSupport.IID)) {
|
||||
return this;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static CID J2XINOUTServerCID = new CID("4aa238d4-d655-40b7-9743-62a5b2e21a5c");
|
||||
static {
|
||||
try {
|
||||
|
||||
try {
|
||||
System.err.println("J2XINOUTClientTestComponent Classloader is " + Class.forName("J2XINOUTClientTestComponent").getClassLoader());
|
||||
Class c = Class.forName("S");
|
||||
}catch(Exception e) {
|
||||
System.err.println("J2XINOUTClientTestComponent Classloa BLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL");
|
||||
}
|
||||
System.out.println("J2XINOUTClientTestComponent - static block ");
|
||||
Class nsIComponentManagerClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIComponentManager");
|
||||
InterfaceRegistry.register(nsIComponentManagerClass);
|
||||
Class proxyHandlerClass =
|
||||
Class.forName("org.mozilla.xpcom.ProxyHandler");
|
||||
InterfaceRegistry.register(proxyHandlerClass);
|
||||
Class nsIFileClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFile");
|
||||
InterfaceRegistry.register(nsIFileClass);
|
||||
Class nsIFactoryClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFactory");
|
||||
InterfaceRegistry.register(nsIFactoryClass);
|
||||
Class nsIEnumeratorClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIEnumerator");
|
||||
InterfaceRegistry.register(nsIEnumeratorClass);
|
||||
System.out.println("DE bug:avm:before registeringiJ2XINOUTServerTestComponent ");
|
||||
Class iJ2XINOUTServerTestComponentClass =
|
||||
Class.forName("org.mozilla.xpcom.iJ2XINOUTServerTestComponent");
|
||||
InterfaceRegistry.register(iJ2XINOUTServerTestComponentClass);
|
||||
} catch (Exception e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################EXCEPTION during interface initialization############");
|
||||
System.err.println(e);
|
||||
} catch (Error e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################Error during interface initialization############");
|
||||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
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
|
||||
$(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)
|
||||
|
||||
install-component: J2XINOUTClientTestComponent.jar.comp J2XINOUTClientTestComponent.jar.info
|
||||
cp -f J2XINOUTClientTestComponent.jar* $(DIST)/bin/components
|
||||
clobber::
|
||||
rm -f *.class *.jar.comp
|
||||
rm -f $(DIST)/bin/components/J2XINOUTClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
@@ -0,0 +1,47 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iClientTestComponent.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(295caa2b-730e-45bd-9229-ad75b0cd3503)]
|
||||
interface iJ2XINOUTClientTestComponent : nsISupports
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
#define J2XINOUTCLIENTTESTCOMPONENT_CID \
|
||||
{ /*1a7ecb30-6a68-4894-943f-e227bebf3861*/ \
|
||||
0x1a7ecb30, \
|
||||
0x6a68, \
|
||||
0x4894, \
|
||||
{0x94, 0x3f, 0xe2, 0x27, 0xbe, 0xbf, 0x38, 0x61} \
|
||||
}
|
||||
|
||||
#define J2XINOUTCLIENTTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XINOUTClient;1"
|
||||
|
||||
%}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XINOUTClientTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XINOUTClientTestComponent
|
||||
*
|
||||
* IID: 0x295caa2b-730e-45bd-9229-ad75b0cd3503
|
||||
*/
|
||||
|
||||
public interface iJ2XINOUTClientTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("295caa2b-730e-45bd-9229-ad75b0cd3503");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,66 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..\..
|
||||
topsrcdir = ..\..\..\..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XINOUTClientTestComponent
|
||||
COMPONENT=1
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XINOUTClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XINOUTClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XINOUTClientTestComponent.java
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
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:
|
||||
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)
|
||||
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
|
||||
@@ -0,0 +1 @@
|
||||
Component-Class: J2XINOUTClientTestComponent
|
||||
31
mozilla/java/xpcom/test/basic/params/J2XINOUT/makefile.win
Normal file
31
mozilla/java/xpcom/test/basic/params/J2XINOUT/makefile.win
Normal file
@@ -0,0 +1,31 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
35
mozilla/java/xpcom/test/basic/params/J2XOUT/Makefile.in
Normal file
35
mozilla/java/xpcom/test/basic/params/J2XOUT/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
@@ -0,0 +1,431 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prenv.h"
|
||||
#include "stdio.h"
|
||||
#include "nsMemory.h"
|
||||
#include "BCTest.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include "J2XOUTServerTestComponent.h"
|
||||
#include "prmem.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringUtil.h"
|
||||
|
||||
char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* fBuffer=NULL;
|
||||
PRUint8 end_of_data = 112;
|
||||
|
||||
|
||||
J2XOUTServerTestComponentImpl::J2XOUTServerTestComponentImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
printf("DEbug:avm:J2XOUTServerTestComponentImpl::J2XOUTServerTestComponentImp\n");
|
||||
testLocation=PR_GetEnv(BC_TEST_LOCATION_VAR_NAME);
|
||||
logLocation=PR_GetEnv(BC_LOG_LOCATION_VAR_NAME);
|
||||
if((testLocation == NULL)||(logLocation == NULL)) {
|
||||
fprintf(stderr,"ERROR: %s or %s isn't set !", BC_TEST_LOCATION_VAR_NAME, BC_LOG_LOCATION_VAR_NAME);
|
||||
}
|
||||
InitStackVars();
|
||||
}
|
||||
|
||||
J2XOUTServerTestComponentImpl::~J2XOUTServerTestComponentImpl()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(J2XOUTServerTestComponentImpl, iJ2XOUTServerTestComponent);
|
||||
IMPL_PROCEED_RESULTS(J2XOUTServerTestComponentImpl)
|
||||
IMPL_VAR_STACKS(J2XOUTServerTestComponentImpl)
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::GetTestLocation(char **tLocation, char **lLocation) {
|
||||
*tLocation = testLocation;
|
||||
*lLocation = logLocation;
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
|
||||
* Method Flush(const char *type) is used to flush content
|
||||
* of fBuffer variable to file with result.
|
||||
* Param: used to specify the type of tests. e.g short, string, ...
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::Flush(const char *type) {
|
||||
char* fileName = NULL;
|
||||
fileName = PR_sprintf_append(fileName,"j2x.out.server.%s",type);
|
||||
if(fBuffer) {
|
||||
PrintResult(fileName,fBuffer);
|
||||
PR_smprintf_free(fBuffer);
|
||||
fBuffer = NULL;
|
||||
}
|
||||
PR_smprintf_free(fileName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRInt16 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRInt16 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestShort(PRInt16 *i) {
|
||||
if(PRInt16Vars.size()) {
|
||||
*i = PRInt16Vars.top();
|
||||
PRInt16Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%hd\n",*i);
|
||||
} else {
|
||||
fprintf(stderr,"PRInt16Vars.size() is null\n");
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRInt32 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRInt32 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestLong(PRInt32 *i) {
|
||||
if(PRInt32Vars.size()) {
|
||||
*i = PRInt32Vars.top();
|
||||
PRInt32Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%ld\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRInt64 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRInt64 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestLonglong(PRInt64 *i) {
|
||||
if(PRInt64Vars.size()) {
|
||||
*i = PRInt64Vars.top();
|
||||
PRInt64Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%lld\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRUint8 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRUint8 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestByte(PRUint8 *i) {
|
||||
if(PRUint8Vars.size()) {
|
||||
*i = PRUint8Vars.top();
|
||||
PRUint8Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRUint16 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRUint16 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestUShort(PRUint16 *i) {
|
||||
if(PRUint16Vars.size()) {
|
||||
*i = PRUint16Vars.top();
|
||||
PRUint16Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%hu\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRUint32 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRUint32 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestULong(PRUint32 *i) {
|
||||
if(PRUint32Vars.size()) {
|
||||
*i = PRUint32Vars.top();
|
||||
PRUint32Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%lu\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of PRUint64 variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to PRUint64 variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestULonglong(PRUint64 *i) {
|
||||
if(PRUint64Vars.size()) {
|
||||
*i = PRUint64Vars.top();
|
||||
PRUint64Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%llu\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of float variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to float variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestFloat(float *i) {
|
||||
if(floatVars.size()) {
|
||||
*i = floatVars.top();
|
||||
floatVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of double variables,
|
||||
* append it fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to double variable, that should be used to return value
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestDouble(double *i) {
|
||||
if(doubleVars.size()) {
|
||||
*i = doubleVars.top();
|
||||
doubleVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Gets next value from internal stack of boolean variables,
|
||||
* append it to fBuffer for future saving and return it via out parameter i
|
||||
* Parameter i :This is pointer to boolean variable, that should be used to return value
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestBoolean(PRBool *i) {
|
||||
if(PRBoolVars.size()) {
|
||||
*i = PRBoolVars.top();
|
||||
PRBoolVars.pop();
|
||||
if(*i == PR_TRUE) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n","true");
|
||||
}else {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n","false");
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestChar(char *i) {
|
||||
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);
|
||||
return NS_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
* Returns some string value via out parameter i
|
||||
* Parameter i :This is double pointer to char variable, that should be used to return string value
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestString(char **i) {
|
||||
char* str = "Some string";
|
||||
PrintResult("j2x.out.server.string",str);
|
||||
*i = PL_strdup(str);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Returns some unicode string value via out parameter i
|
||||
* Parameter i :This is double pointer to PRUnichar variable, that should be used to return string value
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestWString(PRUnichar **i) {
|
||||
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)
|
||||
return NS_OK;
|
||||
//
|
||||
PrintResult("j2x.out.server.wstring",str);
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
|
||||
* Fills array of strings and return it.
|
||||
* Parameter count : PRUint32 value used to cpecify length of array
|
||||
* Parameter valueArray: char*** variable. Used to return array of strings
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestStringArray(PRUint32 count, char ***valueArray) {
|
||||
char* baseString = "This is base string N ";
|
||||
*valueArray = (char**)PR_Calloc(sizeof(char*), count);
|
||||
for(int i=0;i<count;i++) {
|
||||
fprintf(stderr,"I is %d\n",i);
|
||||
(*valueArray)[i] = PR_smprintf("%s %d",baseString,i);
|
||||
}
|
||||
for(int j=0;j<count;j++) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",(*valueArray)[j]);
|
||||
}
|
||||
Flush("stringArray");
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
|
||||
* Fills array of PRInt32 and return it.
|
||||
* Parameter count : PRUint32 value used to cpecify length of array
|
||||
* Parameter longArray: PRInt32** variable. Used to return array of PRInt32
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestLongArray(PRUint32 count, PRInt32 **longArray) {
|
||||
*longArray = (PRInt32*)PR_Calloc(sizeof(PRInt32*),count);
|
||||
for(int i=0;i<count;i++) {
|
||||
(*longArray)[i] = 65600 + i; //Intend, that count is less than 2^16 :)
|
||||
}
|
||||
PrintResultArray("j2x.out.server.longArray",count,*longArray);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Fills array of PRInt32 and return it.
|
||||
* Parameter count : PRUint32 value used to cpecify length of array
|
||||
* Parameter valueArray: char** variable. Used to return array of chars
|
||||
|
||||
*/
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestCharArray(PRUint32 count, char **valueArray) {
|
||||
*valueArray = (char*)PR_Calloc(sizeof(char*), count);
|
||||
for(int i=0;i<count;i++) {
|
||||
(*valueArray)[i] = (65 + i)%96 + 32;
|
||||
}
|
||||
PrintResultArray("j2x.out.server.charArray",count,*valueArray);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* Fills many variables of different types and return them.
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::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) {
|
||||
*bBool=true;
|
||||
*nByte=3;
|
||||
*nShort=3; *nUShort=3;
|
||||
*nLong=3; *nULong=3;
|
||||
*nHyper=3; *nUHyper=3;
|
||||
*fFloat=7;
|
||||
*fDouble=7;
|
||||
*aString=PL_strdup("abc");
|
||||
*longArray = (PRInt32*)PR_Calloc(sizeof(PRInt32*),count);
|
||||
for(int i=0;i<count;i++) {
|
||||
(*longArray)[i] = 65600 + i; //Intend, that count is less than 2^16 :)
|
||||
}
|
||||
PrintResultMixed("j2x.out.server.mixed",*bBool, (char)'A',*nByte, *nShort,
|
||||
*nUShort, *nLong, *nULong, *nHyper, *nUHyper, *fFloat,
|
||||
*fDouble, *aString, count, *longArray);
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
|
||||
* Invoke method GetTestObjectString(char** str) and saves
|
||||
* identification string, as result.Then return "this" as object
|
||||
* Parameter obj: iJ2XOUTServerTestComponent ** variable. Used to return object
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::TestObject(iJ2XOUTServerTestComponent **obj) {
|
||||
char * str;
|
||||
GetTestObjectString(&str);
|
||||
*obj = this;
|
||||
PrintResult("j2x.out.server.object",str);
|
||||
return NS_OK;
|
||||
}
|
||||
/**
|
||||
|
||||
* Auxiliary method, that used just for object indentification
|
||||
* Invoked from client and from server, then identification strings compared.
|
||||
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP J2XOUTServerTestComponentImpl::GetTestObjectString(char** str) {
|
||||
*str = "String Ident";
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iJ2XOUTServerTestComponent.h"
|
||||
#include "ProceedResults.h"
|
||||
#include "VarContainer.h"
|
||||
|
||||
class J2XOUTServerTestComponentImpl : public iJ2XOUTServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XOUTSERVERTESTCOMPONENT
|
||||
DECL_PROCEED_RESULTS
|
||||
DECL_VAR_STACKS
|
||||
|
||||
J2XOUTServerTestComponentImpl();
|
||||
virtual ~J2XOUTServerTestComponentImpl();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class _MYCLASS_ : public iJ2XOUTServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XOUTSERVERTESTCOMPONENT
|
||||
|
||||
_MYCLASS_();
|
||||
virtual ~_MYCLASS_();
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "J2XOUTServerTestComponent.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(J2XOUTServerTestComponentImpl)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "J2XOUT Server Test Component", J2XOUTSERVERTESTCOMPONENT_CID, J2XOUTSERVERTESTCOMPONENT_PROGID, J2XOUTServerTestComponentImplConstructor,
|
||||
NULL /* NULL if you dont need one */,
|
||||
NULL /* NULL if you dont need one */
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("J2XOUTServerTestComponentFactory", components)
|
||||
|
||||
60
mozilla/java/xpcom/test/basic/params/J2XOUT/cpp/Makefile.in
Normal file
60
mozilla/java/xpcom/test/basic/params/J2XOUT/cpp/Makefile.in
Normal file
@@ -0,0 +1,60 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XOUTServerTestComponent
|
||||
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) \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
J2XOUTServerTestComponent.cpp \
|
||||
J2XOUTServerTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XOUTServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XOUTServerTestComponent.java
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
@@ -0,0 +1,70 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(9c812168-7e00-4c15-a5dc-d5fd0846a554)]
|
||||
interface iJ2XOUTServerTestComponent : nsISupports
|
||||
{
|
||||
void GetTestLocation(out string tLocation, out string lLocation);
|
||||
void flush(in string s);
|
||||
void TestShort(out short i);
|
||||
void TestLong(out long i);
|
||||
void TestLonglong(out long long i);
|
||||
void TestByte(out octet i);
|
||||
void TestUShort(out unsigned short i);
|
||||
void TestULong(out unsigned long i);
|
||||
void TestULonglong(out unsigned long long i);
|
||||
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 TestString(out string i);
|
||||
void TestWString(out wstring i);
|
||||
void TestStringArray(in unsigned long count,[array, size_is(count)] out string valueArray);
|
||||
void TestLongArray(in unsigned long count, [array, size_is(count)] out long longArray);
|
||||
void TestCharArray(in unsigned long count,[array, size_is(count)] out char valueArray);
|
||||
void TestMixed(out boolean bBool,/* out char cChar,*/ out octet nByte,
|
||||
out short nShort, out unsigned short nUShort,
|
||||
out long nLong, out unsigned long nULong,
|
||||
out long long nHyper, out unsigned long long nUHyper,
|
||||
out float fFloat, out double fDouble,
|
||||
out string aString,
|
||||
in unsigned long count, [array, size_is(count)] out long longArray);
|
||||
void TestObject(out iJ2XOUTServerTestComponent obj);
|
||||
string GetTestObjectString();
|
||||
};
|
||||
|
||||
%{ C++
|
||||
#define J2XOUTSERVERTESTCOMPONENT_CID \
|
||||
{ /*b1dcff02-0348-44ca-b662-29f5e375be27*/ \
|
||||
0xb1dcff02, \
|
||||
0x0348, \
|
||||
0x44ca, \
|
||||
{0xb6, 0x62, 0x29, 0xf5, 0xe3, 0x75, 0xbe, 0x27} \
|
||||
}
|
||||
|
||||
#define J2XOUTSERVERTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XOUTServer;1"
|
||||
|
||||
%}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XOUTServerTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XOUTServerTestComponent
|
||||
*
|
||||
* IID: 0x9c812168-7e00-4c15-a5dc-d5fd0846a554
|
||||
*/
|
||||
|
||||
public interface iJ2XOUTServerTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("9c812168-7e00-4c15-a5dc-d5fd0846a554");
|
||||
|
||||
|
||||
/* 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 (out short i); */
|
||||
public void testShort(short[] i);
|
||||
|
||||
/* void TestLong (out long i); */
|
||||
public void testLong(int[] i);
|
||||
|
||||
/* void TestLonglong (out long long i); */
|
||||
public void testLonglong(long[] i);
|
||||
|
||||
/* void TestByte (out octet i); */
|
||||
public void testByte(byte[] i);
|
||||
|
||||
/* void TestUShort (out unsigned short i); */
|
||||
public void testUShort(short[] i);
|
||||
|
||||
/* void TestULong (out unsigned long i); */
|
||||
public void testULong(int[] i);
|
||||
|
||||
/* void TestULonglong (out unsigned long long i); */
|
||||
public void testULonglong(long[] i);
|
||||
|
||||
/* void TestFloat (out float i); */
|
||||
public void testFloat(float[] i);
|
||||
|
||||
/* void TestDouble (out double i); */
|
||||
public void testDouble(double[] i);
|
||||
|
||||
/* void TestBoolean (out boolean i); */
|
||||
public void testBoolean(boolean[] i);
|
||||
|
||||
/* void TestString (out string i); */
|
||||
public void testString(String[] i);
|
||||
|
||||
/* void TestWString (out wstring i); */
|
||||
public void testWString(String[] i);
|
||||
|
||||
/* void TestStringArray (in unsigned long count, [array, size_is (count)] out string valueArray); */
|
||||
public void testStringArray(int count, String[][] valueArray);
|
||||
|
||||
/* void TestLongArray (in unsigned long count, [array, size_is (count)] out long longArray); */
|
||||
public void testLongArray(int count, int[][] longArray);
|
||||
|
||||
/* void TestCharArray (in unsigned long count, [array, size_is (count)] out char valueArray); */
|
||||
public void testCharArray(int count, char[][] valueArray);
|
||||
|
||||
/* void TestMixed (out boolean bBool, out octet nByte, out short nShort, out unsigned short nUShort, out long nLong, out unsigned long nULong, out long long nHyper, out unsigned long long nUHyper, out float fFloat, out double fDouble, out string aString, in unsigned long count, [array, size_is (count)] out 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 (out iJ2XOUTServerTestComponent obj); */
|
||||
public void testObject(iJ2XOUTServerTestComponent[] obj);
|
||||
|
||||
/* string GetTestObjectString (); */
|
||||
public String getTestObjectString();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
60
mozilla/java/xpcom/test/basic/params/J2XOUT/cpp/makefile.win
Normal file
60
mozilla/java/xpcom/test/basic/params/J2XOUT/cpp/makefile.win
Normal file
@@ -0,0 +1,60 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=..\..\..\..\..\..\..
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = J2XOUTServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XOUTServerTestComponent
|
||||
COMPONENT = 1
|
||||
JAVAI= iJ2XOUTServerTestComponent.java
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XOUTServerTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XOUTServerTestComponent.obj \
|
||||
.\$(OBJDIR)\J2XOUTServerTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
JAVAC=$(JDKHOME)\bin\javac -classpath $(CLASSPATH);$(DEPTH)\dist\classes -d $(DEPTH)\dist\classes
|
||||
|
||||
|
||||
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)
|
||||
@@ -0,0 +1,2 @@
|
||||
b73109a8-c552-497e-8f42-dc0b4a8fc422
|
||||
@mozilla/blackwood/blackconnect/test/params/J2XOUTClient;1
|
||||
@@ -0,0 +1,422 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class J2XOUTClientTestComponent implements iJ2XOUTClientTestComponent, iClientTestComponent, iJClientTestComponent, iExclusionSupport {
|
||||
private iJ2XOUTServerTestComponent server = null;
|
||||
private String testLocation = null;
|
||||
private String logLocation = null;
|
||||
private byte endOfData = 112;
|
||||
private Hashtable exclusionHash = new Hashtable();
|
||||
|
||||
public J2XOUTClientTestComponent() {
|
||||
System.out.println("DEbug:avm:J2XOUTClientTestComponent constructor");
|
||||
}
|
||||
private void printResult(String res,String fileName) {
|
||||
try{
|
||||
DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/" + fileName));
|
||||
f.writeBytes(res);
|
||||
f.close();
|
||||
} catch(Exception e) {
|
||||
System.err.println("Exception during writing the file: " +e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void exclude(int count, String[] exclusionList) {
|
||||
System.out.println("DEbug:avm:J2XOUTClientTestComponent:exclude");
|
||||
for(int i=0;i<count;i++) {
|
||||
exclusionHash.put((Object)exclusionList[i],new Object());
|
||||
}
|
||||
}
|
||||
public void initialize(String serverProgID) {
|
||||
|
||||
System.out.println("DEbug:avm:J2XOUTClientTestComponent:initialize");
|
||||
//Really code from tHack should be here!!
|
||||
}
|
||||
public void tHack(nsIComponentManager cm, String serverProgID) {
|
||||
System.out.println("DEbug:avm:J2XOUTClientTestComponent:tHack");
|
||||
nsIFactory factory = null;
|
||||
|
||||
if(cm == null) {
|
||||
System.out.println("DEbug:avm:ComponentManager is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
factory = cm.findFactory(J2XOUTServerCID);
|
||||
if(factory == null) {
|
||||
System.out.println("DEbug:avm:Factory is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
Object res = factory.createInstance(null, iJ2XOUTServerTestComponent.IID);
|
||||
if(res == null) {
|
||||
System.out.println("DEbug:avm:Instance is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
server = (iJ2XOUTServerTestComponent)res;
|
||||
if(server == null) {
|
||||
System.err.println("Create instance failed!! Server is NULLLLLLLLLLLLLLLLLLL");
|
||||
return;
|
||||
}
|
||||
String[] s = new String[1];
|
||||
String[] s1 = new String[1];
|
||||
server.getTestLocation(s,s1);
|
||||
testLocation = s[0];
|
||||
logLocation = s1[0];
|
||||
|
||||
}
|
||||
|
||||
/* void Execute (); */
|
||||
public void execute() {
|
||||
System.out.println("DEbug:avm:J2XOUTClientTestComponent:execute");
|
||||
if(server == null) {
|
||||
System.err.println("Server is not initialized!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
testLong();
|
||||
if(!exclusionHash.containsKey("longlong"))
|
||||
testLonglong();
|
||||
if(!exclusionHash.containsKey("octet"))
|
||||
testByte();
|
||||
if(!exclusionHash.containsKey("ushort"))
|
||||
testUshort();
|
||||
if(!exclusionHash.containsKey("ulong"))
|
||||
testsUlong();
|
||||
if(!exclusionHash.containsKey("ulonglong"))
|
||||
testsUlonglong();
|
||||
if(!exclusionHash.containsKey("float"))
|
||||
testsFloat();
|
||||
if(!exclusionHash.containsKey("double"))
|
||||
testDouble();
|
||||
if(!exclusionHash.containsKey("boolean"))
|
||||
testBoolean();
|
||||
if(!exclusionHash.containsKey("string"))
|
||||
testString();
|
||||
if(!exclusionHash.containsKey("wstring"))
|
||||
testsWstring();
|
||||
if(!exclusionHash.containsKey("stringArray"))
|
||||
testStringArray();
|
||||
if(!exclusionHash.containsKey("longArray"))
|
||||
testLongArray();
|
||||
if(!exclusionHash.containsKey("charArray"))
|
||||
testCharArray();
|
||||
if(!exclusionHash.containsKey("object"))
|
||||
testObject();
|
||||
if(!exclusionHash.containsKey("mixed"))
|
||||
testMixed();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
server.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);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
private void testShort() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
System.err.println("server.testShort");
|
||||
short[] shortVar = new short[1];
|
||||
server.testShort(shortVar);
|
||||
while(shortVar[0] != endOfData) {
|
||||
s.append(shortVar[0]+"\n");
|
||||
server.testShort(shortVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.short");
|
||||
server.flush("short");
|
||||
}
|
||||
private void testLong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
int[] intVar = new int[1];
|
||||
System.err.println("server.testLong");
|
||||
server.testLong(intVar);
|
||||
while(intVar[0] != endOfData) {
|
||||
s.append(intVar[0]+"\n");
|
||||
server.testLong(intVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.long");
|
||||
server.flush("long");
|
||||
}
|
||||
private void testLonglong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
long[] longVar = new long[1];
|
||||
System.err.println("server.testLonglong");
|
||||
server.testLonglong(longVar);
|
||||
while(longVar[0] != endOfData) {
|
||||
s.append(longVar[0]+"\n");
|
||||
server.testLonglong(longVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.longlong");
|
||||
server.flush("longlong");
|
||||
}
|
||||
private void testByte() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
byte [] byteVar = new byte[1];
|
||||
System.err.println("server.testByte");
|
||||
server.testByte(byteVar);
|
||||
while(byteVar[0] != endOfData) {
|
||||
s.append(byteVar[0]+"\n");
|
||||
server.testByte(byteVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.octet");
|
||||
server.flush("octet");
|
||||
}
|
||||
private void testUshort() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
short [] ushortVar = new short[1];
|
||||
System.err.println("server.testUshort");
|
||||
server.testUShort(ushortVar);
|
||||
while(ushortVar[0] != endOfData) {
|
||||
s.append(ushortVar[0]+"\n");
|
||||
server.testUShort(ushortVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.ushort");
|
||||
server.flush("ushort");
|
||||
}
|
||||
private void testsUlong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
int [] uintVar = new int[1];
|
||||
System.err.println("server.testUlong");
|
||||
server.testULong(uintVar);
|
||||
while(uintVar[0] != endOfData) {
|
||||
s.append(uintVar[0]+"\n");
|
||||
server.testULong(uintVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.ulong");
|
||||
server.flush("ulong");
|
||||
}
|
||||
|
||||
|
||||
private void testsUlonglong() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
long [] ulongVar = new long[1];
|
||||
System.err.println("server.testUlonglong");
|
||||
server.testULonglong(ulongVar);
|
||||
while(ulongVar[0] != endOfData) {
|
||||
s.append(ulongVar[0]+"\n");
|
||||
server.testULonglong(ulongVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.ulonglong");
|
||||
server.flush("ulonglong");
|
||||
}
|
||||
private void testsFloat() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
float [] floatVar = new float[1];
|
||||
System.err.println("server.testFloat");
|
||||
server.testFloat(floatVar);
|
||||
while(floatVar[0] != endOfData) {
|
||||
s.append(floatVar[0]+"\n");
|
||||
server.testFloat(floatVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.float");
|
||||
server.flush("float");
|
||||
}
|
||||
private void testDouble() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
double [] doubleVar = new double[1];
|
||||
System.err.println("server.testDouble");
|
||||
server.testDouble(doubleVar);
|
||||
while(doubleVar[0] != endOfData) {
|
||||
s.append(doubleVar[0]+"\n");
|
||||
server.testDouble(doubleVar);
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.double");
|
||||
server.flush("double");
|
||||
}
|
||||
private void testBoolean() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
boolean [] booleanVar = new boolean[1];
|
||||
System.err.println("server.testBoolean");
|
||||
server.testBoolean(booleanVar);
|
||||
s.append(booleanVar[0]+"\n");
|
||||
server.testBoolean(booleanVar);
|
||||
s.append(booleanVar[0]+"\n");
|
||||
printResult(s.toString(),"j2x.out.client.boolean");
|
||||
server.flush("boolean");
|
||||
}
|
||||
|
||||
/*
|
||||
//server.testChar(charVar);
|
||||
//server.testWChar(charVar);
|
||||
*/
|
||||
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");
|
||||
}
|
||||
private void testsWstring() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
String[] stringVar = new String[1];
|
||||
server.testWString(stringVar);
|
||||
s.append(stringVar[0]+"\n");
|
||||
printResult(s.toString(),"j2x.out.client.wstring");
|
||||
server.flush("wstring");
|
||||
}
|
||||
|
||||
private void testStringArray() {
|
||||
String[][] stringArray = new String[1][4];
|
||||
int count = 4;
|
||||
StringBuffer s = new StringBuffer();
|
||||
server.testStringArray(count, stringArray);
|
||||
System.out.println("IIP");
|
||||
for(int i=0;i<count;i++) {
|
||||
s.append(stringArray[0][i]+"\n");
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.stringArray");
|
||||
}
|
||||
private void testLongArray() {
|
||||
StringBuffer s = new StringBuffer();
|
||||
int[][] intArray = new int[1][100];
|
||||
int count = 100;
|
||||
server.testLongArray(count, intArray);
|
||||
for(int i=0;i<count;i++) {
|
||||
s.append(intArray[0][i]+"\n");
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.longArray");
|
||||
|
||||
}
|
||||
private void testCharArray() {
|
||||
char[][] charArray = new char[1][100];
|
||||
int count = 100;
|
||||
StringBuffer s = new StringBuffer();
|
||||
server.testCharArray(count, charArray);
|
||||
for(int i=0;i<count;i++) {
|
||||
s.append(charArray[0][i]+"\n");
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.charArray");
|
||||
}
|
||||
|
||||
private void testMixed() {
|
||||
boolean[] bBool = new boolean[1];
|
||||
char[] cChar = new char[1]; //Skip this value due to JDK1.3 bug
|
||||
byte[] nByte = new byte[1];
|
||||
short[] nShort = new short[1];
|
||||
short[] nUShort = new short[1];
|
||||
int[] nLong = new int[1];
|
||||
int[] nULong = new int[1];
|
||||
long[] nHyper = new long[1];
|
||||
long[] nUHyper = new long[1];
|
||||
float[] fFloat = new float[1];
|
||||
double[] fDouble = new double[1];
|
||||
String[] aString = new String[1];
|
||||
int count = 5;
|
||||
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();
|
||||
s.append(bBool[0]+"\n");
|
||||
s.append('A'+"\n");//Append zerro instead of skipped char
|
||||
s.append(nByte[0]+"\n");
|
||||
s.append(nShort[0]+"\n");
|
||||
s.append(nUShort[0]+"\n");
|
||||
s.append(nLong[0]+"\n");
|
||||
s.append(nULong[0]+"\n");
|
||||
s.append(nHyper[0]+"\n");
|
||||
s.append(nUHyper[0]+"\n");
|
||||
s.append(fFloat[0]+"\n");
|
||||
s.append(fDouble[0]+"\n");
|
||||
s.append(aString[0]+"\n");
|
||||
//s.append(count+"\n");
|
||||
for(int i=0;i<count;i++) {
|
||||
s.append(longArray[0][i]+"\n");
|
||||
}
|
||||
printResult(s.toString(),"j2x.out.client.mixed");
|
||||
//flush is'n required here !!!
|
||||
}
|
||||
|
||||
|
||||
private void testObject() {
|
||||
iJ2XOUTServerTestComponent[] iServer = new iJ2XOUTServerTestComponent[1];
|
||||
server.testObject(iServer);
|
||||
printResult(iServer[0].getTestObjectString(),"j2x.out.client.object");
|
||||
}
|
||||
|
||||
public Object queryInterface(IID iid) {
|
||||
System.out.println("DEbug:avm:J2XOUTClientTestComponent::queryInterface iid="+iid);
|
||||
if ( iid.equals(nsISupports.IID)
|
||||
|| iid.equals(iJ2XOUTClientTestComponent.IID)||iid.equals(iClientTestComponent.IID)||iid.equals(iExclusionSupport.IID)) {
|
||||
return this;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static CID J2XOUTServerCID = new CID("b1dcff02-0348-44ca-b662-29f5e375be27");
|
||||
static {
|
||||
try {
|
||||
|
||||
try {
|
||||
System.err.println("2XINClientTestComponent Classloader is " + Class.forName("J2XOUTClientTestComponent").getClassLoader());
|
||||
Class c = Class.forName("S");
|
||||
}catch(Exception e) {
|
||||
System.err.println("INClientTestComponent Classloa BLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL");
|
||||
}
|
||||
System.out.println("J2XOUTClientTestComponent - static block ");
|
||||
Class nsIComponentManagerClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIComponentManager");
|
||||
InterfaceRegistry.register(nsIComponentManagerClass);
|
||||
Class proxyHandlerClass =
|
||||
Class.forName("org.mozilla.xpcom.ProxyHandler");
|
||||
InterfaceRegistry.register(proxyHandlerClass);
|
||||
Class nsIFileClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFile");
|
||||
InterfaceRegistry.register(nsIFileClass);
|
||||
Class nsIFactoryClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFactory");
|
||||
InterfaceRegistry.register(nsIFactoryClass);
|
||||
Class nsIEnumeratorClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIEnumerator");
|
||||
InterfaceRegistry.register(nsIEnumeratorClass);
|
||||
System.out.println("DE bug:avm:before registeringiJ2XOUTServerTestComponent ");
|
||||
Class iJ2XOUTServerTestComponentClass =
|
||||
Class.forName("org.mozilla.xpcom.iJ2XOUTServerTestComponent");
|
||||
InterfaceRegistry.register(iJ2XOUTServerTestComponentClass);
|
||||
} catch (Exception e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################EXCEPTION during interface initialization############");
|
||||
System.err.println(e);
|
||||
} catch (Error e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################Error during interface initialization############");
|
||||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
57
mozilla/java/xpcom/test/basic/params/J2XOUT/java/Makefile.in
Normal file
57
mozilla/java/xpcom/test/basic/params/J2XOUT/java/Makefile.in
Normal file
@@ -0,0 +1,57 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
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
|
||||
$(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)
|
||||
|
||||
install-component: J2XOUTClientTestComponent.jar.comp J2XOUTClientTestComponent.jar.info
|
||||
cp -f J2XOUTClientTestComponent.jar* $(DIST)/bin/components
|
||||
clobber::
|
||||
rm -f *.class *.jar.comp
|
||||
rm -f $(DIST)/bin/components/J2XOUTClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
@@ -0,0 +1,47 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iClientTestComponent.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(c258526f-2789-4476-9981-8eb5d95218f1)]
|
||||
interface iJ2XOUTClientTestComponent : nsISupports
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
#define J2XOUTCLIENTTESTCOMPONENT_CID \
|
||||
{ /*b73109a8-c552-497e-8f42-dc0b4a8fc422*/ \
|
||||
0xb73109a8, \
|
||||
0xc552, \
|
||||
0x497e, \
|
||||
{0x8f, 0x42, 0xdc, 0x0b, 0x4a, 0x8f, 0xc4, 0x22} \
|
||||
}
|
||||
|
||||
#define J2XOUTCLIENTTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XOUTClient;1"
|
||||
|
||||
%}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XOUTClientTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XOUTClientTestComponent
|
||||
*
|
||||
* IID: 0xc258526f-2789-4476-9981-8eb5d95218f1
|
||||
*/
|
||||
|
||||
public interface iJ2XOUTClientTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("c258526f-2789-4476-9981-8eb5d95218f1");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,65 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..\..
|
||||
topsrcdir = ..\..\..\..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XOUTClientTestComponent
|
||||
COMPONENT=1
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XOUTClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XOUTClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XOUTClientTestComponent.java
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
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:
|
||||
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)
|
||||
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
|
||||
@@ -0,0 +1 @@
|
||||
Component-Class: J2XOUTClientTestComponent
|
||||
31
mozilla/java/xpcom/test/basic/params/J2XOUT/makefile.win
Normal file
31
mozilla/java/xpcom/test/basic/params/J2XOUT/makefile.win
Normal file
@@ -0,0 +1,31 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
35
mozilla/java/xpcom/test/basic/params/J2XRET/Makefile.in
Normal file
35
mozilla/java/xpcom/test/basic/params/J2XRET/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
@@ -0,0 +1,364 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prenv.h"
|
||||
#include "stdio.h"
|
||||
#include "nsMemory.h"
|
||||
#include "BCTest.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include "J2XRETServerTestComponent.h"
|
||||
#include "prmem.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringUtil.h"
|
||||
|
||||
|
||||
char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* fBuffer=NULL;
|
||||
PRUint8 end_of_data = 112;
|
||||
|
||||
int all=0;
|
||||
|
||||
|
||||
J2XRETServerTestComponentImpl::J2XRETServerTestComponentImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
testLocation=PR_GetEnv(BC_TEST_LOCATION_VAR_NAME);
|
||||
logLocation=PR_GetEnv(BC_LOG_LOCATION_VAR_NAME);
|
||||
InitStackVars();
|
||||
printf("DEbug:avm:J2XRETServerTestComponentImpl::J2XRETServerTestComponentImp\n");
|
||||
}
|
||||
|
||||
J2XRETServerTestComponentImpl::~J2XRETServerTestComponentImpl()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(J2XRETServerTestComponentImpl, iJ2XRETServerTestComponent);
|
||||
IMPL_PROCEED_RESULTS(J2XRETServerTestComponentImpl)
|
||||
IMPL_VAR_STACKS(J2XRETServerTestComponentImpl)
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::GetTestLocation(char **tLocation, char **lLocation) {
|
||||
*tLocation = testLocation;
|
||||
*lLocation = logLocation;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::Flush(const char *type) {
|
||||
char* fileName = NULL;
|
||||
|
||||
fileName = PR_sprintf_append(fileName,"j2x.ret.server.%s",type);
|
||||
if(fBuffer) {
|
||||
PrintResult(fileName,fBuffer);
|
||||
PR_smprintf_free(fileName);
|
||||
PR_smprintf_free(fBuffer);
|
||||
fBuffer = NULL;
|
||||
} else {
|
||||
}
|
||||
if(fBuffer != NULL ) {
|
||||
}else {
|
||||
}
|
||||
all=0;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestShort(PRInt16 *i) {
|
||||
if(PRInt16Vars.size()) {
|
||||
*i = PRInt16Vars.top();
|
||||
PRInt16Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%hd\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("short");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestLong(PRInt32 *i) {
|
||||
if(PRInt32Vars.size()) {
|
||||
*i = PRInt32Vars.top();
|
||||
PRInt32Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%ld\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("long");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestLonglong(PRInt64 *i) {
|
||||
if(PRInt64Vars.size()) {
|
||||
*i = PRInt64Vars.top();
|
||||
PRInt64Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%lld\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("longlong");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestByte(PRUint8 *i) {
|
||||
if(PRUint8Vars.size()) {
|
||||
*i = PRUint8Vars.top();
|
||||
PRUint8Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("octet");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestUShort(PRUint16 *i) {
|
||||
if(PRUint16Vars.size()) {
|
||||
*i = PRUint16Vars.top();
|
||||
PRUint16Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%hu\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("ushort");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestULong(PRUint32 *i) {
|
||||
if(PRUint32Vars.size()) {
|
||||
*i = PRUint32Vars.top();
|
||||
PRUint32Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%lu\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("ulong");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestULonglong(PRUint64 *i) {
|
||||
if(PRUint64Vars.size()) {
|
||||
*i = PRUint64Vars.top();
|
||||
PRUint64Vars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%llu\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("ulonglong");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestFloat(float *i) {
|
||||
if(floatVars.size()) {
|
||||
*i = floatVars.top();
|
||||
floatVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("float");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestDouble(double *i) {
|
||||
if(doubleVars.size()) {
|
||||
*i = doubleVars.top();
|
||||
doubleVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%.3e\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("double");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestBoolean(PRBool *i) {
|
||||
if(PRBoolVars.size()) {
|
||||
*i = PRBoolVars.top();
|
||||
PRBoolVars.pop();
|
||||
if(*i == PR_TRUE) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n","true");
|
||||
}else if (*i == PR_FALSE) {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n","false");
|
||||
}
|
||||
} else Flush("boolean");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestChar(char *i) {
|
||||
if(charVars.size()) {
|
||||
*i = charVars.top();
|
||||
charVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("char");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestWChar(PRUnichar *i) {
|
||||
if(wcharVars.size()) {
|
||||
*i = wcharVars.top();
|
||||
wcharVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",*i);
|
||||
} else {
|
||||
*i = end_of_data;
|
||||
Flush("wchar");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestString(char* *i) {
|
||||
|
||||
if(stringVars.size()) {
|
||||
*i = stringVars.top();
|
||||
stringVars.pop();
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",*i);
|
||||
} else {
|
||||
*i="";
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s",*i);
|
||||
Flush("string");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestWString(PRUnichar* *i) {
|
||||
char* _string="";
|
||||
|
||||
if (all==0) {
|
||||
_string="";
|
||||
nsCString* cstr=new nsCString(_string);
|
||||
*i=cstr->ToNewUnicode();
|
||||
nsString str = *(new nsString(*i));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf,str,100)
|
||||
fBuffer=PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
}
|
||||
}
|
||||
if (all==1) {
|
||||
_string="Test string.";
|
||||
nsCString* cstr=new nsCString(_string);
|
||||
*i=cstr->ToNewUnicode();
|
||||
nsString str = *(new nsString(*i));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf,str,100)
|
||||
fBuffer=PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
}
|
||||
}
|
||||
if (all==2) {
|
||||
_string="null string";
|
||||
nsCString* cstr=new nsCString(_string);
|
||||
*i=cstr->ToNewUnicode();
|
||||
nsString str = *(new nsString(*i));
|
||||
{
|
||||
NS_ALLOC_STR_BUF(aBuf,str,100)
|
||||
fBuffer=PR_sprintf_append(fBuffer,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
}
|
||||
Flush("wstring");
|
||||
}
|
||||
|
||||
all++;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestStringArray(PRUint32 count, char ***valueArray) {
|
||||
|
||||
char** _ret=(char**)PR_Malloc(sizeof(char*)*3);
|
||||
_ret[0]="ctrl-f";
|
||||
_ret[1]="iddqd";
|
||||
_ret[2]="idkfa";
|
||||
|
||||
|
||||
for(int j=0;j<count;j++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%s\n",_ret[j]);
|
||||
Flush("stringArray");
|
||||
|
||||
*valueArray=_ret;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestLongArray(PRUint32 count, int **intA) {
|
||||
|
||||
int *ret=(int*)PR_Malloc(sizeof(int)*3);
|
||||
ret[0]=33;
|
||||
ret[1]=44;
|
||||
ret[2]=55;
|
||||
|
||||
for(int j=0;j<count;j++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%d\n",ret[j]);
|
||||
Flush("longArray");
|
||||
|
||||
*intA=ret;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestCharArray(PRUint32 count, char **valueArray) {
|
||||
|
||||
char* ret=(char*)PR_Malloc(sizeof(char)*3);
|
||||
ret[0]='x';
|
||||
ret[1]='y';
|
||||
ret[2]='z';
|
||||
|
||||
for(int j=0;j<count;j++)
|
||||
fBuffer = PR_sprintf_append(fBuffer,"%c\n",ret[j]);
|
||||
Flush("charArray");
|
||||
|
||||
*valueArray=ret;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestObject(iJ2XRETServerTestComponent **obj) {
|
||||
*obj=this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP J2XRETServerTestComponentImpl::TestObj() {
|
||||
fBuffer = PR_sprintf_append(fBuffer,"!!!Right string!!!");
|
||||
Flush("object");
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iJ2XRETServerTestComponent.h"
|
||||
#include "ProceedResults.h"
|
||||
#include "VarContainer.h"
|
||||
|
||||
class J2XRETServerTestComponentImpl : public iJ2XRETServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XRETSERVERTESTCOMPONENT
|
||||
DECL_PROCEED_RESULTS
|
||||
DECL_VAR_STACKS
|
||||
|
||||
J2XRETServerTestComponentImpl();
|
||||
virtual ~J2XRETServerTestComponentImpl();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class _MYCLASS_ : public iJ2XRETServerTestComponent
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_IJ2XRETSERVERTESTCOMPONENT
|
||||
|
||||
_MYCLASS_();
|
||||
virtual ~_MYCLASS_();
|
||||
/* additional members */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "J2XRETServerTestComponent.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(J2XRETServerTestComponentImpl)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "J2XRET Server Test Component", J2XRETSERVERTESTCOMPONENT_CID, J2XRETSERVERTESTCOMPONENT_PROGID, J2XRETServerTestComponentImplConstructor,
|
||||
NULL /* NULL if you dont need one */,
|
||||
NULL /* NULL if you dont need one */
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("J2XRETServerTestComponentFactory", components)
|
||||
|
||||
60
mozilla/java/xpcom/test/basic/params/J2XRET/cpp/Makefile.in
Normal file
60
mozilla/java/xpcom/test/basic/params/J2XRET/cpp/Makefile.in
Normal file
@@ -0,0 +1,60 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = J2XRETServerTestComponent
|
||||
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) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
J2XRETServerTestComponent.cpp \
|
||||
J2XRETServerTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iJ2XRETServerTestComponent.idl
|
||||
|
||||
JAVAI = iJ2XRETServerTestComponent.java
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAVAC=$(JDKHOME)/bin/javac -classpath $(DIST)/classes -d $(DIST)/classes
|
||||
|
||||
export::
|
||||
$(JAVAC) $(JAVAI)
|
||||
@@ -0,0 +1,63 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(9fc6c6b0-a413-11d4-9d3d-00a024a8bb88)]
|
||||
interface iJ2XRETServerTestComponent : nsISupports
|
||||
{
|
||||
void GetTestLocation(out string tLocation, out string lLocation);
|
||||
void flush(in string s);
|
||||
short TestShort();
|
||||
long TestLong();
|
||||
long long TestLonglong();
|
||||
octet TestByte();
|
||||
unsigned short TestUShort();
|
||||
unsigned long TestULong();
|
||||
unsigned long long TestULonglong();
|
||||
float TestFloat();
|
||||
double TestDouble();
|
||||
boolean TestBoolean();
|
||||
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);
|
||||
iJ2XRETServerTestComponent TestObject();
|
||||
void TestObj();
|
||||
};
|
||||
|
||||
%{ C++
|
||||
#define J2XRETSERVERTESTCOMPONENT_CID \
|
||||
{ /*1c274ca0-a414-11d4-9d3d-00a024a8bb88*/ \
|
||||
0x1c274ca0, \
|
||||
0xa414, \
|
||||
0x11d4, \
|
||||
{0x9d, 0x3d, 0x00, 0xa0, 0x24, 0xa8, 0xbb, 0x88} \
|
||||
}
|
||||
|
||||
#define J2XRETSERVERTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XRETServer;1"
|
||||
|
||||
%}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XRETServerTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XRETServerTestComponent
|
||||
*
|
||||
* IID: 0x9fc6c6b0-a413-11d4-9d3d-00a024a8bb88
|
||||
*/
|
||||
|
||||
public interface iJ2XRETServerTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("9fc6c6b0-a413-11d4-9d3d-00a024a8bb88");
|
||||
|
||||
|
||||
/* 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);
|
||||
|
||||
/* short TestShort (); */
|
||||
public short testShort();
|
||||
|
||||
/* long TestLong (); */
|
||||
public int testLong();
|
||||
|
||||
/* long long TestLonglong (); */
|
||||
public long testLonglong();
|
||||
|
||||
/* octet TestByte (); */
|
||||
public byte testByte();
|
||||
|
||||
/* unsigned short TestUShort (); */
|
||||
public short testUShort();
|
||||
|
||||
/* unsigned long TestULong (); */
|
||||
public int testULong();
|
||||
|
||||
/* unsigned long long TestULonglong (); */
|
||||
public long testULonglong();
|
||||
|
||||
/* float TestFloat (); */
|
||||
public float testFloat();
|
||||
|
||||
/* double TestDouble (); */
|
||||
public double testDouble();
|
||||
|
||||
/* boolean TestBoolean (); */
|
||||
public boolean testBoolean();
|
||||
|
||||
/* char TestChar (); */
|
||||
public char testChar();
|
||||
|
||||
/* wchar TestWChar (); */
|
||||
public char testWChar();
|
||||
|
||||
/* string TestString (); */
|
||||
public String testString();
|
||||
|
||||
/* wstring TestWString (); */
|
||||
public String testWString();
|
||||
|
||||
/* void TestStringArray (in unsigned long count, [array, size_is (count), retval] out string stringArray); */
|
||||
public String[] testStringArray(int count);
|
||||
|
||||
/* 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();
|
||||
|
||||
/* void TestObj (); */
|
||||
public void testObj();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
57
mozilla/java/xpcom/test/basic/params/J2XRET/cpp/makefile.win
Normal file
57
mozilla/java/xpcom/test/basic/params/J2XRET/cpp/makefile.win
Normal file
@@ -0,0 +1,57 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=..\..\..\..\..\..\..
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = J2XRETServerTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = J2XRETServerTestComponent
|
||||
COMPONENT = 1
|
||||
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\J2XRETServerTestComponent.obj \
|
||||
.\$(OBJDIR)\J2XRETServerTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
XPIDLSRCS = .\iJ2XRETServerTestComponent.idl
|
||||
|
||||
JAVAI= iJ2XRETServerTestComponent.java
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
JAVAC=$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes -d $(DEPTH)\dist\classes
|
||||
|
||||
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)
|
||||
@@ -0,0 +1,2 @@
|
||||
04b339f0-a412-11d4-9d3d-00a024a8bb88
|
||||
@mozilla/blackwood/blackconnect/test/params/J2XRETClient;1
|
||||
@@ -0,0 +1,391 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
public class J2XRETClientTestComponent implements iJ2XRETClientTestComponent, iClientTestComponent, iJClientTestComponent, iExclusionSupport {
|
||||
private iJ2XRETServerTestComponent server = null;
|
||||
private String testLocation = null;
|
||||
private String logLocation = null;
|
||||
private String[] location1, location2;
|
||||
private byte endOfData = 112;
|
||||
private Hashtable exclusionHash = new Hashtable();
|
||||
private StringBuffer s;
|
||||
|
||||
public J2XRETClientTestComponent() {
|
||||
System.out.println("DEbug:avm:J2XRETClientTestComponent constructor");
|
||||
}
|
||||
|
||||
private void printResult(String res,String fileName) {
|
||||
try{
|
||||
DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/" + fileName));
|
||||
f.writeBytes(res);
|
||||
f.close();
|
||||
} catch(Exception e) {
|
||||
System.err.println("Exception during writing the file: " +e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void exclude(int count, String[] exclusionList) {
|
||||
System.out.println("DEbug:avm:J2XRETClientTestComponent:exclude");
|
||||
for(int i=0;i<count;i++) {
|
||||
exclusionHash.put((Object)exclusionList[i],new Object());
|
||||
}
|
||||
}
|
||||
|
||||
public void initialize(String serverProgID) {
|
||||
|
||||
System.out.println("DEbug:avm:J2XRETClientTestComponent:initialize");
|
||||
//Really code from tHack should be here!!
|
||||
}
|
||||
public void tHack(nsIComponentManager cm, String serverProgID) {
|
||||
System.out.println("DEbug:avm:J2XRETClientTestComponent:tHack--");
|
||||
nsIFactory factory = null;
|
||||
|
||||
System.out.println("CM="+cm);
|
||||
if(cm == null) {
|
||||
System.out.println("DEbug:avm:ComponentManager is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
factory = cm.findFactory(J2XRETServerCID);
|
||||
System.out.println("FAC="+factory);
|
||||
if(factory == null) {
|
||||
System.out.println("DEbug:avm:Factory is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
Object res = factory.createInstance(null, iJ2XRETServerTestComponent.IID);
|
||||
System.out.println("RES="+res);
|
||||
System.out.println("IID="+iJ2XRETServerTestComponent.IID);
|
||||
if(res == null) {
|
||||
System.out.println("DEbug:avm:Instance is NULL!!!!!");
|
||||
return;
|
||||
}
|
||||
server = (iJ2XRETServerTestComponent)res;
|
||||
System.out.println("SER="+server);
|
||||
if(server == null) {
|
||||
System.err.println("Create instance failed!! Server is NULLLLLLLLLLLLLLLLLLL");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
String[] s2 = new String[1];
|
||||
String[] s1 = new String[1];
|
||||
server.getTestLocation(s2,s1);
|
||||
testLocation = s2[0];
|
||||
logLocation = s1[0];
|
||||
|
||||
}
|
||||
|
||||
/* void Execute (); */
|
||||
public void execute() {
|
||||
System.out.println("DEbug:avm:J2XRETClientTestComponent:execute");
|
||||
|
||||
if(server == null) {
|
||||
System.err.println("Server is not initialized!!!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!exclusionHash.containsKey("short"))
|
||||
testShort();
|
||||
if(!exclusionHash.containsKey("long"))
|
||||
testLong();
|
||||
if(!exclusionHash.containsKey("longlong"))
|
||||
testLonglong();
|
||||
if(!exclusionHash.containsKey("octet"))
|
||||
testByte();
|
||||
if(!exclusionHash.containsKey("ushort"))
|
||||
testUShort();
|
||||
if(!exclusionHash.containsKey("ulong"))
|
||||
testULong();
|
||||
if(!exclusionHash.containsKey("ulonglong"))
|
||||
testULonglong();
|
||||
if(!exclusionHash.containsKey("float"))
|
||||
testFloat();
|
||||
if(!exclusionHash.containsKey("double"))
|
||||
testDouble();
|
||||
if(!exclusionHash.containsKey("boolean"))
|
||||
testBoolean();
|
||||
if(!exclusionHash.containsKey("string"))
|
||||
testString();
|
||||
if(!exclusionHash.containsKey("wstring"))
|
||||
testWString();
|
||||
if(!exclusionHash.containsKey("stringArray"))
|
||||
testStringArray();
|
||||
if(!exclusionHash.containsKey("longArray"))
|
||||
testLongArray();
|
||||
if(!exclusionHash.containsKey("charArray"))
|
||||
testCharArray();
|
||||
if(!exclusionHash.containsKey("object"))
|
||||
testObject();
|
||||
|
||||
}
|
||||
|
||||
private void testShort() {
|
||||
s = new StringBuffer();
|
||||
short shortVar = 8;
|
||||
shortVar=server.testShort();
|
||||
while(shortVar != endOfData) {
|
||||
s.append(shortVar+"\n");
|
||||
shortVar=server.testShort();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.short");
|
||||
}
|
||||
|
||||
private void testLong() {
|
||||
s = new StringBuffer();
|
||||
int intVar = 8;
|
||||
intVar=server.testLong();
|
||||
while(intVar != endOfData) {
|
||||
s.append(intVar+"\n");
|
||||
intVar=server.testLong();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.long");
|
||||
}
|
||||
|
||||
private void testLonglong() {
|
||||
s = new StringBuffer();
|
||||
long longVar = 8;
|
||||
longVar=server.testLonglong();
|
||||
while(longVar != endOfData) {
|
||||
s.append(longVar+"\n");
|
||||
longVar=server.testLonglong();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.longlong");
|
||||
}
|
||||
|
||||
private void testByte() {
|
||||
s = new StringBuffer();
|
||||
byte byteVar = 8;
|
||||
byteVar=server.testByte();
|
||||
while(byteVar != endOfData) {
|
||||
s.append(byteVar+"\n");
|
||||
byteVar=server.testByte();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.octet");
|
||||
}
|
||||
|
||||
private void testUShort() {
|
||||
s = new StringBuffer();
|
||||
short ushortVar = 8;
|
||||
ushortVar=server.testUShort();
|
||||
while(ushortVar != endOfData) {
|
||||
s.append(ushortVar+"\n");
|
||||
ushortVar=server.testUShort();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.ushort");
|
||||
}
|
||||
|
||||
private void testULong() {
|
||||
s = new StringBuffer();
|
||||
int uintVar = 8;
|
||||
uintVar=server.testULong();
|
||||
while(uintVar != endOfData) {
|
||||
s.append(uintVar+"\n");
|
||||
uintVar=server.testULong();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.ulong");
|
||||
}
|
||||
|
||||
private void testULonglong() {
|
||||
s = new StringBuffer();
|
||||
long ulongVar = 8;
|
||||
ulongVar=server.testULonglong();
|
||||
while(ulongVar != endOfData) {
|
||||
s.append(ulongVar+"\n");
|
||||
ulongVar=server.testULonglong();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.ulonglong");
|
||||
}
|
||||
|
||||
private void testFloat() {
|
||||
s = new StringBuffer();
|
||||
float floatVar = 8;
|
||||
floatVar=server.testFloat();
|
||||
while(floatVar != endOfData) {
|
||||
s.append(floatVar+"\n");
|
||||
floatVar=server.testFloat();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.float");
|
||||
}
|
||||
|
||||
private void testDouble() {
|
||||
s = new StringBuffer();
|
||||
double doubleVar = 8;
|
||||
doubleVar=server.testDouble();
|
||||
while(doubleVar != endOfData) {
|
||||
s.append(doubleVar+"\n");
|
||||
doubleVar=server.testDouble();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.double");
|
||||
}
|
||||
|
||||
private void testBoolean() {
|
||||
s = new StringBuffer();
|
||||
boolean booleanVar = false;
|
||||
booleanVar=server.testBoolean();
|
||||
s.append(booleanVar+"\n");
|
||||
booleanVar=server.testBoolean();
|
||||
s.append(booleanVar+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.boolean");
|
||||
server.testBoolean();
|
||||
}
|
||||
|
||||
private void testString() {
|
||||
s = new StringBuffer();
|
||||
String stringVar ="8";
|
||||
stringVar=server.testString();
|
||||
while(!stringVar.equals("112")) {
|
||||
s.append(stringVar+"\n");
|
||||
stringVar=server.testString();
|
||||
}
|
||||
s.append(stringVar+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.string");
|
||||
server.testString();
|
||||
}
|
||||
|
||||
private void testWString() {
|
||||
s = new StringBuffer();
|
||||
String wstringVar ="abcdefg";
|
||||
wstringVar=server.testWString();
|
||||
s.append(wstringVar+"\n");
|
||||
wstringVar=server.testWString();
|
||||
s.append(wstringVar+"\n");
|
||||
wstringVar=server.testWString();
|
||||
s.append(wstringVar+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.wstring");
|
||||
}
|
||||
|
||||
private void testLongArray() {
|
||||
s = new StringBuffer();
|
||||
int[] intAVar = {0,0,0};
|
||||
int count=3;
|
||||
intAVar=server.testLongArray(count);
|
||||
for(int i=0;i<count;i++)
|
||||
s.append(intAVar[i]+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.longArray");
|
||||
}
|
||||
|
||||
private void testCharArray() {
|
||||
s = new StringBuffer();
|
||||
char[] charAVar = {'0','0','0'};
|
||||
int count=3;
|
||||
charAVar=server.testCharArray(count);
|
||||
for(int i=0;i<count;i++)
|
||||
s.append(charAVar[i]+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.charArray");
|
||||
}
|
||||
|
||||
private void testStringArray() {
|
||||
s = new StringBuffer();
|
||||
String[] stringAVar = {"0","0","0"};
|
||||
int count=3;
|
||||
stringAVar=server.testStringArray(count);
|
||||
for(int i=0;i<count;i++)
|
||||
s.append(stringAVar[i]+"\n");
|
||||
printResult(s.toString(),"j2x.ret.client.stringArray");
|
||||
}
|
||||
|
||||
private void testObject() {
|
||||
s = new StringBuffer();
|
||||
iJ2XRETServerTestComponent obj=null;
|
||||
try {
|
||||
obj=server.testObject();
|
||||
obj.testObj();
|
||||
}catch(Exception e) {
|
||||
printResult(e.toString(),"j2x.ret.client.object");
|
||||
}
|
||||
printResult("!!!Right string!!!","j2x.ret.client.object");
|
||||
}
|
||||
|
||||
private void testWChar() {
|
||||
s = new StringBuffer();
|
||||
char wcharVar = '8';
|
||||
wcharVar=server.testWChar();
|
||||
while(wcharVar != endOfData) {
|
||||
s.append(wcharVar+"\n");
|
||||
wcharVar=server.testWChar();
|
||||
}
|
||||
printResult(s.toString(),"j2x.ret.client.wchar");
|
||||
}
|
||||
|
||||
private void testChar() {
|
||||
s = new StringBuffer();
|
||||
char charVar = '8';
|
||||
charVar=server.testChar();
|
||||
while(charVar != endOfData) {
|
||||
s.append(charVar+"\n");
|
||||
charVar=server.testChar();
|
||||
}
|
||||
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)
|
||||
|| iid.equals(iJ2XRETClientTestComponent.IID)
|
||||
||iid.equals(iClientTestComponent.IID)
|
||||
||iid.equals(iExclusionSupport.IID)) {
|
||||
return this;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static CID J2XRETServerCID = new CID("1c274ca0-a414-11d4-9d3d-00a024a8bb88");
|
||||
static {
|
||||
try {
|
||||
System.out.println("J2XRETClientTestComponent - static block ");
|
||||
Class iJ2XRETServerTestComponentClass =
|
||||
Class.forName("org.mozilla.xpcom.iJ2XRETServerTestComponent");
|
||||
InterfaceRegistry.register(iJ2XRETServerTestComponentClass);
|
||||
Class nsIComponentManagerClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIComponentManager");
|
||||
InterfaceRegistry.register(nsIComponentManagerClass);
|
||||
Class proxyHandlerClass =
|
||||
Class.forName("org.mozilla.xpcom.ProxyFactory");
|
||||
InterfaceRegistry.register(proxyHandlerClass);
|
||||
Class nsIFileClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFile");
|
||||
InterfaceRegistry.register(nsIFileClass);
|
||||
Class nsIFactoryClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIFactory");
|
||||
InterfaceRegistry.register(nsIFactoryClass);
|
||||
Class nsIEnumeratorClass =
|
||||
Class.forName("org.mozilla.xpcom.nsIEnumerator");
|
||||
InterfaceRegistry.register(nsIEnumeratorClass);
|
||||
System.out.println("DE bug:avm:before registeringiJ2XRETServerTestComponent ");
|
||||
} catch (Exception e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################EXCEPTION during interface initialization############");
|
||||
System.err.println(e);
|
||||
} catch (Error e) {
|
||||
System.err.println("#####################################################################");
|
||||
System.err.println("####################Error during interface initialization############");
|
||||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
57
mozilla/java/xpcom/test/basic/params/J2XRET/java/Makefile.in
Normal file
57
mozilla/java/xpcom/test/basic/params/J2XRET/java/Makefile.in
Normal file
@@ -0,0 +1,57 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
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
|
||||
$(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)
|
||||
|
||||
install-component: J2XRETClientTestComponent.jar.comp J2XRETClientTestComponent.jar.info
|
||||
cp -f J2XRETClientTestComponent.jar* $(DIST)/bin/components
|
||||
clobber::
|
||||
rm -f *.class *.jar.comp
|
||||
rm -f $(DIST)/bin/components/J2XRETClientTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
@@ -0,0 +1,47 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iClientTestComponent.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(8ed2e8b0-a412-11d4-9d3d-00a024a8bb88)]
|
||||
interface iJ2XRETClientTestComponent : nsISupports
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
#define J2XRETCLIENTTESTCOMPONENT_CID \
|
||||
{ /*04b339f0-a412-11d4-9d3d-00a024a8bb88*/ \
|
||||
0x04b339f0, \
|
||||
0xa412, \
|
||||
0x11d4, \
|
||||
{0x9d, 0x3d, 0x00, 0xa0, 0x24, 0xa8, 0xbb, 0x88} \
|
||||
}
|
||||
|
||||
#define J2XRETCLIENTTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/J2XRETClient;1"
|
||||
|
||||
%}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJ2XRETClientTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJ2XRETClientTestComponent
|
||||
*
|
||||
* IID: 0x8ed2e8b0-a412-11d4-9d3d-00a024a8bb88
|
||||
*/
|
||||
|
||||
public interface iJ2XRETClientTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("8ed2e8b0-a412-11d4-9d3d-00a024a8bb88");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,64 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..\..
|
||||
topsrcdir = ..\..\..\..\..\..\..
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
MODULE=J2XRETClientTestComponent
|
||||
COMPONENT=1
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iJ2XRETClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
JAVA_SRC = \
|
||||
J2XRETClientTestComponent.java
|
||||
|
||||
JAVAI_SRC = \
|
||||
iJ2XRETClientTestComponent.java
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
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:
|
||||
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)
|
||||
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
|
||||
@@ -0,0 +1 @@
|
||||
Component-Class: J2XRETClientTestComponent
|
||||
31
mozilla/java/xpcom/test/basic/params/J2XRET/makefile.win
Normal file
31
mozilla/java/xpcom/test/basic/params/J2XRET/makefile.win
Normal file
@@ -0,0 +1,31 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
40
mozilla/java/xpcom/test/basic/params/Makefile.in
Normal file
40
mozilla/java/xpcom/test/basic/params/Makefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
TestLoader \
|
||||
J2XIN \
|
||||
J2XOUT \
|
||||
J2XINOUT \
|
||||
J2XRET \
|
||||
X2JIN \
|
||||
X2JOUT \
|
||||
X2JINOUT \
|
||||
X2JRET \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
38
mozilla/java/xpcom/test/basic/params/Makefile.win
Normal file
38
mozilla/java/xpcom/test/basic/params/Makefile.win
Normal file
@@ -0,0 +1,38 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH = ..\..\..\..\..
|
||||
|
||||
DIRS= \
|
||||
TestLoader \
|
||||
J2XIN \
|
||||
X2JIN \
|
||||
X2JOUT \
|
||||
X2JINOUT \
|
||||
X2JRET \
|
||||
J2XOUT \
|
||||
J2XINOUT \
|
||||
J2XRET \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
27
mozilla/java/xpcom/test/basic/params/README
Normal file
27
mozilla/java/xpcom/test/basic/params/README
Normal file
@@ -0,0 +1,27 @@
|
||||
Black Connect Tests
|
||||
================================
|
||||
|
||||
Requirements:
|
||||
|
||||
* same as for BlackConnect (mozilla/java/xpcom)
|
||||
|
||||
How To Build:
|
||||
|
||||
* Build mozilla and BlackConnect
|
||||
|
||||
* Copy directory basic to mozilla/java/xpcom/test
|
||||
(Then struct will mozilla/java/xpcom/test/basic/params ...)
|
||||
|
||||
* Do make in mozilla/java/xpcom/test/basic/params
|
||||
|
||||
|
||||
How To Run:
|
||||
|
||||
* set environment variable BC_TEST_LOCATION to directory with BCTest.lst
|
||||
|
||||
* set environment variable BC_LOG_LOCATION to some directory(any writable dir)
|
||||
|
||||
* run mozilla and load mozilla/java/xpcom/test/basic/params/TestLoader/start.html
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
/**
|
||||
* A sample of XPConnect. This file contains a sample interface.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/**
|
||||
* The uuid is a unique number identifying the interface normally
|
||||
* called IID. It can be generated as follows:
|
||||
*
|
||||
* Windows: guidgen.exe
|
||||
* Unix: uuidgen which comes with e2fsprogs package
|
||||
* Mac: ???
|
||||
* All platform: Using irc, connect to irc.mozilla.org and type in
|
||||
* /join #mozilla
|
||||
* /msg mozbot uuid
|
||||
*
|
||||
*/
|
||||
|
||||
[scriptable, uuid(f1bc2000-8ef3-11d4-aa1b-00a024a8bbac)]
|
||||
interface BCITestLoader : nsISupports
|
||||
{
|
||||
/*
|
||||
attribute string value;
|
||||
void writeValue(in string aPrefix);
|
||||
void poke(in string aValue);
|
||||
void test();
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
/**
|
||||
* {8fb93ec0-8ef4-11d4-aa1b-00a024a8bbac}
|
||||
* The CID is also a unique number that look just like the IID
|
||||
* and identifies uniquely an implementation
|
||||
*/
|
||||
#define BCTESTLOADER_CID \
|
||||
{ /* 8fb93ec0-8ef4-11d4-aa1b-00a024a8bbac */ \
|
||||
0x8fb93ec0, \
|
||||
0x8ef4, \
|
||||
0x11d4, \
|
||||
{0xaa, 0x1b, 0x00, 0xa0, 0x24, 0xa8, 0xbb, 0xac} \
|
||||
}
|
||||
|
||||
#define BCTESTLOADER_PROGID "@mozilla/blackwood/blackconnect/test/params/TestLoader;1"
|
||||
%}
|
||||
|
||||
|
||||
27
mozilla/java/xpcom/test/basic/params/TestLoader/BCTest.h
Normal file
27
mozilla/java/xpcom/test/basic/params/TestLoader/BCTest.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#define BC_TEST_LIST_FILE_NAME "BCTest.lst"
|
||||
#define BC_TEST_LOCATION_VAR_NAME "BC_TEST_LOCATION"
|
||||
#define BC_PROGID_PREFIX "@mozilla/blackwood/blackconnect/test/params/"
|
||||
#define BC_LOG_LOCATION_VAR_NAME "BC_LOG_LOCATION"
|
||||
344
mozilla/java/xpcom/test/basic/params/TestLoader/BCTestLoader.cpp
Normal file
344
mozilla/java/xpcom/test/basic/params/TestLoader/BCTestLoader.cpp
Normal file
@@ -0,0 +1,344 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* A sample of XPConnect. This file contains an implementation nsSample
|
||||
* of the interface nsISample.
|
||||
*
|
||||
*/
|
||||
#include "plstr.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include "stdio.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "BCTestLoader.h"
|
||||
#include "prprf.h"
|
||||
#include "prmem.h"
|
||||
#include "nsMemory.h"
|
||||
#include "BCTest.h"
|
||||
|
||||
//////////////////
|
||||
|
||||
|
||||
/////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BCTestLoaderImpl::BCTestLoaderImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
printf("DEbug:avm:BCTestLoaderImpl::BCTestLoaderImpl()\n");
|
||||
testLocation = getenv(BC_TEST_LOCATION_VAR_NAME);
|
||||
if(!testLocation) {
|
||||
fprintf(stderr, "ERROR: %s enviroment variable isn't set !\n",BC_TEST_LOCATION_VAR_NAME);
|
||||
return;
|
||||
}
|
||||
char** testCase = LoadTestList();
|
||||
int i = 0;
|
||||
if (!testCase) {
|
||||
fprintf(stderr, "ERROR: Can't load test list !\n");
|
||||
return;
|
||||
}
|
||||
for(i=0; testCase[i]; i++) {
|
||||
RunTest(testCase[i]);
|
||||
}
|
||||
}
|
||||
|
||||
BCTestLoaderImpl::~BCTestLoaderImpl()
|
||||
{
|
||||
/*
|
||||
if (mValue)
|
||||
PL_strfree(mValue);
|
||||
*/
|
||||
printf("DEbug:avm:BCTestLoaderImpl::~BCTestLoaderImpl()\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* NS_IMPL_ISUPPORTS1 expands to a simple implementation of the nsISupports
|
||||
* interface. This includes a proper implementation of AddRef, Release,
|
||||
* and QueryInterface. If this class supported more interfaces than just
|
||||
* nsISupports,
|
||||
* you could use NS_IMPL_ADDREF() and NS_IMPL_RELEASE() to take care of the
|
||||
* simple stuff, but you would have to create QueryInterface on your own.
|
||||
* nsSampleFactory.cpp is an example of this approach.
|
||||
* Notice that the second parameter to the macro is the static IID accessor
|
||||
* method, and NOT the #defined IID.
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS1(BCTestLoaderImpl, BCITestLoader);
|
||||
|
||||
/**
|
||||
* Notice that in the protoype for this function, the NS_IMETHOD macro was
|
||||
* used to declare the return type. For the implementation, the return
|
||||
* type is declared by NS_IMETHODIMP
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Another buffer passing convention is that buffers passed INTO your
|
||||
* object ARE NOT YOURS. Keep your hands off them, unless they are
|
||||
* declared "inout". If you want to keep the value for posterity,
|
||||
* you will have to make a copy of it.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Custom methods
|
||||
|
||||
**/
|
||||
|
||||
NS_IMETHODIMP BCTestLoaderImpl::RunTest(char* ID) {
|
||||
nsresult rv;
|
||||
iClientTestComponent* client = NULL;
|
||||
printf("DEbug:avm:Running test %s\n",ID);
|
||||
rv = InitClient(ID,&client);
|
||||
if(NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
rv = client->Execute();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP BCTestLoaderImpl::InitClient(char* ID, iClientTestComponent** client) {
|
||||
char * testProgID = NULL;
|
||||
char * clientProgID = NULL;
|
||||
char * serverProgID = NULL;
|
||||
nsresult rv;
|
||||
testProgID = PL_strdup(BC_PROGID_PREFIX);
|
||||
clientProgID = PR_sprintf_append(clientProgID,"%s%sClient;1",testProgID, ID);
|
||||
serverProgID = PR_sprintf_append(serverProgID,"%s%sServer;1",testProgID, ID);
|
||||
fprintf(stderr,"DEbug:avm:Loading %s\n",clientProgID);
|
||||
char** exclusionList = LoadExclusionList(ID);
|
||||
if(ID[0] == 'J') {
|
||||
fprintf(stderr,"DEbug:avm:Loks that we are running J2X tests\n");
|
||||
iJClientTestComponent* client1=(iJClientTestComponent*)client;
|
||||
rv = nsComponentManager::CreateInstance(clientProgID,
|
||||
nsnull,
|
||||
NS_GET_IID(iJClientTestComponent),
|
||||
(void**)&client1);
|
||||
if(NS_FAILED(rv)) {
|
||||
fprintf(stderr, "ERROR: Can't create instance of %s !\n",clientProgID);
|
||||
return rv;
|
||||
}
|
||||
nsIComponentManager* cm;
|
||||
rv = NS_GetGlobalComponentManager(&cm);
|
||||
if(NS_FAILED(rv)) {
|
||||
fprintf(stderr, "ERROR: Can't get GlobalComponentManager!!\n");
|
||||
return rv;
|
||||
}
|
||||
rv = client1->THack(cm, serverProgID);
|
||||
client1->QueryInterface(NS_GET_IID(iClientTestComponent),(void**)client);
|
||||
NS_RELEASE(client1);
|
||||
}else {
|
||||
rv = nsComponentManager::CreateInstance(clientProgID,
|
||||
nsnull,
|
||||
NS_GET_IID(iClientTestComponent),
|
||||
(void**)client);
|
||||
if(NS_FAILED(rv)) {
|
||||
fprintf(stderr, "ERROR: Can't create instance of %s !\n",clientProgID);
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = (*client)->Initialize(serverProgID);
|
||||
if(NS_FAILED(rv)) {
|
||||
fprintf(stderr, "ERROR: Can't initialize client with param %s !\n",serverProgID);
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
if(exclusionList != NULL) {
|
||||
iExclusionSupport* exClient;
|
||||
rv = (*client)->QueryInterface(NS_GET_IID(iExclusionSupport),(void**)&exClient);
|
||||
if(NS_FAILED(rv)) {
|
||||
fprintf(stderr, "Looks, that %s tests is still not support exculsion!!!\n",ID);
|
||||
return NS_OK;
|
||||
}else {
|
||||
fprintf(stderr, "Looks, that %s tests support exculsion!!!\n",ID);
|
||||
}
|
||||
PRInt32 count;
|
||||
for(count=0; exclusionList[count]; count++);
|
||||
exClient->Exclude(count,(const char **) exclusionList);
|
||||
NS_RELEASE(exClient);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*** char** BCTestLoaderImpl::LoadTestList().
|
||||
*** Loads list of tests to execute. Derived from OJI TestLoader loadTestList();
|
||||
*/
|
||||
|
||||
char** BCTestLoaderImpl::LoadTestList() {
|
||||
struct stat st;
|
||||
FILE *file = NULL;
|
||||
char *content;
|
||||
int nRead, nTests, count = 0;
|
||||
char *pos, *pos1;
|
||||
char **testList;
|
||||
char *lstFile = NULL;
|
||||
lstFile = PR_sprintf_append(lstFile,"%s/%s",testLocation,BC_TEST_LIST_FILE_NAME);
|
||||
if (stat(lstFile, &st) < 0) {
|
||||
fprintf(stderr, "ERROR: can't get stat from file %s\n",lstFile);
|
||||
return NULL;
|
||||
}
|
||||
content = (char*)calloc(1, st.st_size+1);
|
||||
if ((file = fopen(lstFile, "r")) == NULL) {
|
||||
fprintf(stderr, "ERROR: can't open file %s\n",lstFile);
|
||||
return NULL;
|
||||
}
|
||||
if ((nRead = fread(content, 1, st.st_size, file)) < st.st_size) {
|
||||
fprintf(stderr, "WARNING: can't read entire file in text mode (%d of %ld) !\n", nRead, st.st_size);
|
||||
//return;
|
||||
}
|
||||
content[nRead] = 0;
|
||||
printf("File content: %s\n", content);
|
||||
fclose(file);
|
||||
|
||||
//allocate maximal possible size
|
||||
nTests = countChars(content, '\n') + 2;
|
||||
printf("nTests = %d\n", nTests);
|
||||
testList = (char**)calloc(sizeof(char*), nTests);
|
||||
testList[0] = 0;
|
||||
pos = content;
|
||||
while((pos1 = PL_strchr(pos, '\n'))) {
|
||||
*pos1 = 0;
|
||||
if(PL_strlen(pos) > 0 && *pos != '#') {
|
||||
//printf("First char: %c\n", *pos);
|
||||
testList[count++] = PL_strdup(pos);
|
||||
}
|
||||
pos = pos1+1;
|
||||
if (!(*pos)) {
|
||||
printf("Parser done: %d .. ", count);
|
||||
testList[count] = 0;
|
||||
printf("ok\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
//If there is no \n after last line
|
||||
if (PL_strlen(pos) > 0 && *pos != '#') {
|
||||
testList[count++] = PL_strdup(pos);
|
||||
testList[count] = 0;
|
||||
}
|
||||
//free(content);
|
||||
return testList;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*** char** BCTestLoaderImpl::LoadExclusionList().
|
||||
*** Loads list of tests to exclude from execution.
|
||||
*/
|
||||
|
||||
char** BCTestLoaderImpl::LoadExclusionList(char* ID) {
|
||||
struct stat st;
|
||||
FILE *file = NULL;
|
||||
char *content;
|
||||
int nRead, nTests, count = 0;
|
||||
char *pos, *pos1;
|
||||
char **excludeList;
|
||||
char *excludeFile = NULL;
|
||||
excludeFile = PR_sprintf_append(excludeFile,"%s/%s.exclude",testLocation,ID);
|
||||
if (stat(excludeFile, &st) < 0) {
|
||||
fprintf(stderr, "Can't found exclusion file %s for %s tests\n",excludeFile,ID);
|
||||
return NULL;
|
||||
}
|
||||
content = (char*)PR_Calloc(1, st.st_size+1);
|
||||
if ((file = fopen(excludeFile, "r")) == NULL) {
|
||||
fprintf(stderr, "ERROR: can't open file %s\n",excludeFile);
|
||||
return NULL;
|
||||
}
|
||||
if ((nRead = fread(content, 1, st.st_size, file)) < st.st_size) {
|
||||
fprintf(stderr, "WARNING: can't read entire file in text mode (%d of %ld) !\n", nRead, st.st_size);
|
||||
//return;
|
||||
}
|
||||
content[nRead] = 0;
|
||||
printf("File content: %s\n", content);
|
||||
fclose(file);
|
||||
|
||||
//allocate maximal possible size
|
||||
nTests = countChars(content, '\n') + 2;
|
||||
printf("nTests = %d\n", nTests);
|
||||
excludeList = (char**)PR_Calloc(sizeof(char*), nTests);
|
||||
excludeList[0] = 0;
|
||||
pos = content;
|
||||
while((pos1 = PL_strchr(pos, '\n'))) {
|
||||
*pos1 = 0;
|
||||
if(PL_strlen(pos) > 0 && *pos != '#') {
|
||||
//printf("First char: %c\n", *pos);
|
||||
excludeList[count++] = PL_strdup(pos);
|
||||
}
|
||||
pos = pos1+1;
|
||||
if (!(*pos)) {
|
||||
printf("Parser done: %d .. ", count);
|
||||
excludeList[count] = 0;
|
||||
printf("ok\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
//If there is no \n after last line
|
||||
if (PL_strlen(pos) > 0 && *pos != '#') {
|
||||
excludeList[count++] = PL_strdup(pos);
|
||||
excludeList[count] = 0;
|
||||
}
|
||||
//free(content);
|
||||
return excludeList;
|
||||
|
||||
}
|
||||
|
||||
int BCTestLoaderImpl::countChars(char* buf, char ch) {
|
||||
char *pos = buf;
|
||||
int count = 0;
|
||||
|
||||
while((pos = PL_strchr(pos, ch))) {
|
||||
pos++;
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP
|
||||
BCTestLoaderImpl::Start()
|
||||
{
|
||||
printf("Test method called");
|
||||
return NS_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
127
mozilla/java/xpcom/test/basic/params/TestLoader/BCTestLoader.h
Normal file
127
mozilla/java/xpcom/test/basic/params/TestLoader/BCTestLoader.h
Normal file
@@ -0,0 +1,127 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
/**
|
||||
* A sample of XPConnect. This file is the header of an implementation
|
||||
* nsSample of the nsISample interface.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "BCITestLoader.h"
|
||||
#include "iClientTestComponent.h"
|
||||
#include "iJClientTestComponent.h"
|
||||
#include "iExclusionSupport.h"
|
||||
/**
|
||||
* SampleImpl is an implementation of the nsISample interface. In XPCOM,
|
||||
* there can be more than one implementation of an given interface. Class
|
||||
* IDs (CIDs) uniquely identify a particular implementation of an interface.
|
||||
* Interface IDs (IIDs) uniquely identify an interface.
|
||||
*/
|
||||
class BCTestLoaderImpl : public BCITestLoader
|
||||
{
|
||||
public:
|
||||
BCTestLoaderImpl();
|
||||
virtual ~BCTestLoaderImpl();
|
||||
|
||||
/**
|
||||
* This macro expands into a declaration of the nsISupports interface.
|
||||
* Every XPCOM component needs to implement nsISupports, as it acts
|
||||
* as the gateway to other interfaces this component implements. You
|
||||
* could manually declare QueryInterface, AddRef, and Release instead
|
||||
* of using this macro, but why?
|
||||
*/
|
||||
// nsISupports interface
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* This macro is defined in the nsISample.h file, and is generated
|
||||
* automatically by the xpidl compiler. It expands to
|
||||
* declarations of all of the methods required to implement the
|
||||
* interface. xpidl will generate a NS_DECL_[INTERFACENAME] macro
|
||||
* for each interface that it processes.
|
||||
*
|
||||
* The methods of nsISample are discussed individually below, but
|
||||
* commented out (because this macro already defines them.)
|
||||
*/
|
||||
NS_DECL_BCITESTLOADER
|
||||
|
||||
/**
|
||||
* The following is an explanation of how the interface header
|
||||
* file expands to for a c++ implementation. NS_DELC_NSISAMPLE
|
||||
* takes care of defining the right c++ implementation.
|
||||
*
|
||||
* The following if provided for more understanding.
|
||||
*
|
||||
* NS_IMETHOD expands to the standard XPCOM return type. XPCOM methods
|
||||
* should never return any other type. The return value is used
|
||||
* behind the scenes by the XPConnect runtime to figure out if the call
|
||||
* failed in any way.
|
||||
* These methods were generated by "attribute string Value" in
|
||||
* nsISample.idl. When reflected into JavaScript, XPCOM will use these
|
||||
* calls as Getter/Setter ops, so that they can be called transparently
|
||||
* as "sample.Value='foo';" and "var val = sample.Value"
|
||||
*/
|
||||
/* NS_IMETHOD GetValue(char * *aValue); */
|
||||
/* NS_IMETHOD SetValue(char * aValue); */
|
||||
|
||||
/**
|
||||
* The const came from the "in" specifier in nsISample.idl. "in"
|
||||
* specifies that the value of this parameter is used only for input,
|
||||
* this method is not allowed to modify the contents of the buffer.
|
||||
*/
|
||||
/* NS_IMETHOD WriteValue(const char *aPrefix); */
|
||||
|
||||
/**
|
||||
* nsISample.idl specifies all of it's string types as string, instead
|
||||
* of wstring (wide string), the Unicode type. If the world were a
|
||||
* perfect place, all normal strings in XPCOM interfaces would be unicode.
|
||||
* If this type had been specified as wstring, it would appear as
|
||||
* PRUnichar * in C++, which is the NSPR type for unicode characters.
|
||||
*/
|
||||
/* NS_IMETHOD Poke(const char* aValue); */
|
||||
|
||||
private:
|
||||
char** LoadTestList();
|
||||
char** LoadExclusionList(char* ID);
|
||||
int countChars(char* buf, char ch);
|
||||
NS_IMETHOD RunTest(char* ID);
|
||||
NS_IMETHOD InitClient(char* ID, iClientTestComponent** client);
|
||||
|
||||
private:
|
||||
char* testLocation;
|
||||
/*
|
||||
char* mValue;
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Suresh Duddu <dp@netscape.com>
|
||||
*/
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "BCTestLoader.h"
|
||||
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(BCTestLoaderImpl)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "BlackConnect TestLoader", BCTESTLOADER_CID, BCTESTLOADER_PROGID, BCTestLoaderImplConstructor,
|
||||
NULL /* dont need additional registration */,
|
||||
NULL /* dont need additional unregistration */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
NS_IMPL_NSGETMODULE("BCTestLoaderFactory", components)
|
||||
|
||||
|
||||
|
||||
83
mozilla/java/xpcom/test/basic/params/TestLoader/Makefile.in
Normal file
83
mozilla/java/xpcom/test/basic/params/TestLoader/Makefile.in
Normal file
@@ -0,0 +1,83 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = BCTestLoader
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
XPIDL_MODULE = $(MODULE)
|
||||
IS_COMPONENT = 1
|
||||
|
||||
EXPORTS = \
|
||||
BCTest.h \
|
||||
ProceedResults.h \
|
||||
Values.h \
|
||||
VarContainer.h
|
||||
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) \
|
||||
$(NULL)
|
||||
|
||||
COMMON_JAVA = VarContainer.java
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
export::
|
||||
$(JDKHOME)/bin/javac -classpath .:$(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI) $(COMMON_JAVA)
|
||||
|
||||
|
||||
#A little temporary hack with messenger
|
||||
install::
|
||||
cp -f start.html $(DIST)/bin/chrome/messenger/content/messenger
|
||||
|
||||
clobber-java:
|
||||
rm -f *.class *.jar
|
||||
clobber:: clobber-java
|
||||
clobber_all:: clobber-java
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
134
mozilla/java/xpcom/test/basic/params/TestLoader/ProceedResults.h
Normal file
134
mozilla/java/xpcom/test/basic/params/TestLoader/ProceedResults.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "prio.h"
|
||||
//#include "prmem.h"
|
||||
#include "prprf.h"
|
||||
|
||||
//Output methods
|
||||
|
||||
#define defaultPerm 00660
|
||||
#define defaultFlags PR_CREATE_FILE|PR_RDWR
|
||||
|
||||
#define DECL_PROCEED_RESULTS \
|
||||
NS_IMETHOD PrintResult(char* fileName, const char* result); \
|
||||
NS_IMETHOD PrintResultArray(char* fileName, PRInt32 count, const char** result); \
|
||||
NS_IMETHOD PrintResultArray(char* fileName, PRInt32 count, const int* result); \
|
||||
NS_IMETHOD PrintResultArray(char* fileName, PRInt32 count, const char* result); \
|
||||
NS_IMETHOD PrintResultMixed(char* fileName, PRBool result1, char result2, PRUint8 result3, \
|
||||
PRInt16 result4, PRUint16 result5, PRInt32 result6, \
|
||||
PRUint32 result7, PRInt64 result8, PRUint64 result9, float result10, \
|
||||
double result11, char* result12, PRInt32 count, PRInt32* result13); \
|
||||
|
||||
|
||||
#define IMPL_PROCEED_RESULTS(_MYCLASS_) \
|
||||
\
|
||||
NS_IMETHODIMP _MYCLASS_::PrintResult(char* fileName,const char* result) { \
|
||||
char* fullName = NULL;\
|
||||
fullName = PR_sprintf_append(fullName,"%s",logLocation);\
|
||||
fullName = PR_sprintf_append(fullName,"/%s",fileName);\
|
||||
PRFileDesc* f = PR_Open(fullName,defaultFlags,defaultPerm);\
|
||||
if (!f) {\
|
||||
fprintf(stderr, "ERROR: File %s is not created", fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
PR_fprintf(f,"%s\n",result);\
|
||||
PR_Close(f);\
|
||||
PR_smprintf_free(fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
NS_IMETHODIMP _MYCLASS_::PrintResultArray(char* fileName, PRInt32 count, const char** result) { \
|
||||
char* fullName = NULL;\
|
||||
fullName = PR_sprintf_append(fullName,"%s",logLocation);\
|
||||
fullName = PR_sprintf_append(fullName,"/%s",fileName);\
|
||||
PRFileDesc* f = PR_Open(fullName,defaultFlags,defaultPerm);\
|
||||
if (!f) {\
|
||||
fprintf(stderr, "ERROR: File %s is not created", fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
for(int i=0;i<count;i++)\
|
||||
PR_fprintf(f,"%s\n",result[i]);\
|
||||
PR_Close(f);\
|
||||
PR_smprintf_free(fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
NS_IMETHODIMP _MYCLASS_::PrintResultArray(char* fileName, PRInt32 count, const int* result) { \
|
||||
char* fullName = NULL;\
|
||||
fullName = PR_sprintf_append(fullName,"%s",logLocation);\
|
||||
fullName = PR_sprintf_append(fullName,"/%s",fileName);\
|
||||
PRFileDesc* f = PR_Open(fullName,defaultFlags,defaultPerm);\
|
||||
if (!f) {\
|
||||
fprintf(stderr, "ERROR: File %s is not created", fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
for(int i=0;i<count;i++)\
|
||||
PR_fprintf(f,"%d\n",result[i]);\
|
||||
PR_Close(f);\
|
||||
PR_smprintf_free(fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
NS_IMETHODIMP _MYCLASS_::PrintResultArray(char* fileName, PRInt32 count, const char* result) { \
|
||||
char* fullName = NULL;\
|
||||
fullName = PR_sprintf_append(fullName,"%s",logLocation);\
|
||||
fullName = PR_sprintf_append(fullName,"/%s",fileName);\
|
||||
PRFileDesc* f = PR_Open(fullName,defaultFlags,defaultPerm);\
|
||||
if (!f) {\
|
||||
fprintf(stderr, "ERROR: File %s is not created", fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
for(int i=0;i<count;i++)\
|
||||
PR_fprintf(f,"%c\n",result[i]);\
|
||||
PR_Close(f);\
|
||||
PR_smprintf_free(fullName);\
|
||||
return NS_OK;\
|
||||
} \
|
||||
NS_IMETHODIMP _MYCLASS_::PrintResultMixed(char* fileName, PRBool result1, char result2, PRUint8 result3, \
|
||||
PRInt16 result4, PRUint16 result5, PRInt32 result6, \
|
||||
PRUint32 result7, PRInt64 result8, PRUint64 result9, float result10, \
|
||||
double result11, char* result12, PRInt32 count, PRInt32* result13) { \
|
||||
char* fullName = NULL;\
|
||||
fullName = PR_sprintf_append(fullName,"%s",logLocation);\
|
||||
fullName = PR_sprintf_append(fullName,"/%s",fileName);\
|
||||
PRFileDesc* f = PR_Open(fullName,defaultFlags,defaultPerm);\
|
||||
if (!f) {\
|
||||
fprintf(stderr, "ERROR: File %s is not created", fullName);\
|
||||
return NS_OK;\
|
||||
}\
|
||||
if (result1==PR_TRUE) PR_fprintf(f,"%s\n","true"); else PR_fprintf(f,"%s\n","false");\
|
||||
PR_fprintf(f,"%c\n",result2);\
|
||||
PR_fprintf(f,"%d\n",result3);\
|
||||
PR_fprintf(f,"%d\n",result4);\
|
||||
PR_fprintf(f,"%d\n",result5);\
|
||||
PR_fprintf(f,"%d\n",result6);\
|
||||
PR_fprintf(f,"%d\n",result7);\
|
||||
PR_fprintf(f,"%lld\n",result8);\
|
||||
PR_fprintf(f,"%llu\n",result9);\
|
||||
PR_fprintf(f,"%0.1f\n",result10);\
|
||||
PR_fprintf(f,"%0.1f\n",result11);\
|
||||
PR_fprintf(f,"%s\n",result12);\
|
||||
for(int i=0;i<count;i++)\
|
||||
PR_fprintf(f,"%d\n",result13[i]);\
|
||||
PR_Close(f);\
|
||||
PR_smprintf_free(fullName);\
|
||||
return NS_OK;\
|
||||
}
|
||||
52
mozilla/java/xpcom/test/basic/params/TestLoader/PseudoHash.h
Normal file
52
mozilla/java/xpcom/test/basic/params/TestLoader/PseudoHash.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems,
|
||||
* Inc. Portions created by Sun are
|
||||
* Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "prio.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#define DECL_PSEUDOHASH \
|
||||
class PseudoHash\
|
||||
{\
|
||||
public:\
|
||||
PseudoHash();\
|
||||
~PseudoHash();\
|
||||
void put(char*);\
|
||||
PRBool containsKey(char*);\
|
||||
};\
|
||||
|
||||
#define IMPL_PSEUDOHASH(_MYCLASS_) \
|
||||
PseudoHash::PseudoHash() {\
|
||||
}\
|
||||
PseudoHash::~PseudoHash() {\
|
||||
}\
|
||||
void PseudoHash::put(char* name) {\
|
||||
fprintf(stdout,"Debug:ovk:PseudoHash::put::%s\n",name);\
|
||||
hash[hashCount]=name;\
|
||||
}\
|
||||
PRBool PseudoHash::containsKey(char* name) {\
|
||||
for(int i=0;i<hashCount;i++) {\
|
||||
fprintf(stdout,"Debug:ovk:PseudoHash::containsKey::NAME=%s HASH=%s\n",name,hash[i]);\
|
||||
if (PL_strcmp(name,hash[i])==0) return PR_TRUE;\
|
||||
}\
|
||||
return PR_FALSE;\
|
||||
}
|
||||
44
mozilla/java/xpcom/test/basic/params/TestLoader/Values.h
Normal file
44
mozilla/java/xpcom/test/basic/params/TestLoader/Values.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
|
||||
#define byte_min (PRUint8)0
|
||||
#define byte_mid (PRUint8)1
|
||||
#define byte_max (PRUint8)127
|
||||
#define short_min (PRInt16)SHRT_MIN
|
||||
#define short_zerro (PRInt16)0
|
||||
#define short_mid (PRInt16)1
|
||||
#define short_max (PRInt16)SHRT_MAX
|
||||
#define int_min (PRInt32)INT_MIN
|
||||
#define int_zerro (PRInt32)0
|
||||
#define int_mid (PRInt32)1
|
||||
#define int_max (PRInt32)INT_MAX
|
||||
#define long_min (PRInt64)LL_MinInt()
|
||||
#define long_zerro (PRInt64)0
|
||||
#define long_mid (PRInt64)1
|
||||
#define long_max (PRInt64)LL_MaxInt()
|
||||
#define ushort_min (PRUint16)0
|
||||
#define ushort_mid (PRUint16)1
|
||||
#define ushort_max (PRUint16)SHRT_MAX
|
||||
#define uint_min (PRUint32)0
|
||||
#define uint_mid (PRUint32)1
|
||||
#define uint_max (PRUint32)INT_MAX
|
||||
#define ulong_min (PRUint64)0
|
||||
#define ulong_mid (PRUint64)1
|
||||
#define ulong_max (PRUint64)LL_MaxInt()
|
||||
#define float_min (float)FLT_MIN
|
||||
#define float_zerro (float)0
|
||||
#define float_mid (float)1
|
||||
#define float_max (float)FLT_MAX
|
||||
#define double_min (double)DBL_MIN
|
||||
#define double_zerro (double)0
|
||||
#define double_mid (double)1
|
||||
#define double_max (double)DBL_MAX
|
||||
#define char_first '0'
|
||||
#define char_last 'Z'
|
||||
#define wchar_first '0'
|
||||
#define wchar_last 'Z'
|
||||
#define string_first "iddqd"
|
||||
#define string_empty ""
|
||||
#define string_null "Here must be the NULL string"
|
||||
#define string_last "112"
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
#include<stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stack>
|
||||
#include "prtypes.h"
|
||||
#include "Values.h"
|
||||
|
||||
typedef std::stack<PRInt16> PRInt16Stack;
|
||||
typedef std::stack<PRInt32> PRInt32Stack;
|
||||
typedef std::stack<PRInt64> PRInt64Stack;
|
||||
typedef std::stack<PRUint8> PRUint8Stack;
|
||||
typedef std::stack<PRUint16> PRUint16Stack;
|
||||
typedef std::stack<PRUint32> PRUint32Stack;
|
||||
typedef std::stack<PRUint64> PRUint64Stack;
|
||||
typedef std::stack<float> floatStack;
|
||||
typedef std::stack<double> doubleStack;
|
||||
typedef std::stack<PRBool> PRBoolStack;
|
||||
typedef std::stack<char> charStack;
|
||||
typedef std::stack<char> wcharStack;
|
||||
typedef std::stack<char*> stringStack;
|
||||
|
||||
#define DECL_VAR_STACKS \
|
||||
NS_IMETHOD InitStackVars(); \
|
||||
PRInt16Stack PRInt16Vars; \
|
||||
PRInt32Stack PRInt32Vars; \
|
||||
PRInt64Stack PRInt64Vars; \
|
||||
PRUint8Stack PRUint8Vars; \
|
||||
PRUint16Stack PRUint16Vars; \
|
||||
PRUint32Stack PRUint32Vars; \
|
||||
PRUint64Stack PRUint64Vars; \
|
||||
floatStack floatVars; \
|
||||
doubleStack doubleVars; \
|
||||
PRBoolStack PRBoolVars; \
|
||||
charStack charVars; \
|
||||
wcharStack wcharVars; \
|
||||
stringStack stringVars; \
|
||||
|
||||
#define IMPL_VAR_STACKS(_MYCLASS_) \
|
||||
\
|
||||
NS_IMETHODIMP _MYCLASS_::InitStackVars() { \
|
||||
PRInt16Vars.push(short_min); \
|
||||
PRInt16Vars.push(short_mid); \
|
||||
PRInt16Vars.push(short_max); \
|
||||
PRInt16Vars.push(short_zerro); \
|
||||
PRInt32Vars.push(int_min); \
|
||||
PRInt32Vars.push(int_mid); \
|
||||
PRInt32Vars.push(int_max); \
|
||||
PRInt32Vars.push(int_zerro); \
|
||||
PRInt64Vars.push(long_min); \
|
||||
PRInt64Vars.push(long_mid); \
|
||||
PRInt64Vars.push(long_max); \
|
||||
PRInt64Vars.push(long_zerro); \
|
||||
PRUint8Vars.push(byte_min); \
|
||||
PRUint8Vars.push(byte_mid); \
|
||||
PRUint8Vars.push(byte_max); \
|
||||
PRUint16Vars.push(ushort_min); \
|
||||
PRUint16Vars.push(ushort_mid); \
|
||||
PRUint16Vars.push(ushort_max); \
|
||||
PRUint32Vars.push(uint_min); \
|
||||
PRUint32Vars.push(uint_mid); \
|
||||
PRUint32Vars.push(uint_max); \
|
||||
PRUint64Vars.push(ulong_min); \
|
||||
PRUint64Vars.push(ulong_mid); \
|
||||
PRUint64Vars.push(ulong_max); \
|
||||
floatVars.push(float_min); \
|
||||
floatVars.push(float_mid); \
|
||||
floatVars.push(float_max); \
|
||||
floatVars.push(float_zerro); \
|
||||
doubleVars.push(double_min); \
|
||||
doubleVars.push(double_mid); \
|
||||
doubleVars.push(double_max); \
|
||||
doubleVars.push(double_zerro); \
|
||||
PRBoolVars.push(PR_TRUE); \
|
||||
PRBoolVars.push(PR_FALSE); \
|
||||
charVars.push(char_first); \
|
||||
charVars.push(char_last); \
|
||||
wcharVars.push(wchar_first); \
|
||||
wcharVars.push(wchar_last); \
|
||||
stringVars.push(string_last); \
|
||||
stringVars.push(string_first); \
|
||||
stringVars.push(string_empty); \
|
||||
stringVars.push(string_null); \
|
||||
return NS_OK; \
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
|
||||
import java.util.Stack;
|
||||
import java.util.EmptyStackException;
|
||||
|
||||
public class VarContainer {
|
||||
//Compatibility section
|
||||
public static byte byteVar = -123;
|
||||
public static short shortVar = -30001;
|
||||
public static int intVar = -2147483601;
|
||||
public static long longVar = -93674872;
|
||||
public static byte unsignedByteVar = 101;
|
||||
public static short unsignedShortVar = 601;
|
||||
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 boolean booleanVar = true;
|
||||
public static char charTruncVar = 'A';
|
||||
public static char charVar = 'B';
|
||||
public static String charPVar = "This is some string";
|
||||
public static String unicharPVar = "UUUAAARRR";
|
||||
//end of compatibility section
|
||||
|
||||
public static byte endOfData = 112;
|
||||
|
||||
public static byte byteMin = 0;
|
||||
public static byte byteMid = 1;
|
||||
public static byte byteMax = 127;
|
||||
public static short shortMin = Short.MIN_VALUE;
|
||||
public static short shortZerro = 0;
|
||||
public static short shortMid = 1;
|
||||
public static short shortMax = Short.MAX_VALUE;
|
||||
public static int intMin = Integer.MIN_VALUE;
|
||||
public static int intZerro = 0;
|
||||
public static int intMid = 1;
|
||||
public static int intMax = Integer.MAX_VALUE;
|
||||
public static long longMin = Long.MIN_VALUE;
|
||||
public static long longZerro = 0;
|
||||
public static long longMid = 1;
|
||||
public static long longMax = Long.MAX_VALUE;
|
||||
public static short ushortMin = 0;
|
||||
public static short ushortMid = 1;
|
||||
public static short ushortMax = Short.MAX_VALUE;
|
||||
public static int uintMin = 0;
|
||||
public static int uintMid = 1;
|
||||
public static int uintMax = Integer.MAX_VALUE;
|
||||
public static long ulongMin = 0;
|
||||
public static long ulongMid = 1;
|
||||
public static long ulongMax = Long.MAX_VALUE;
|
||||
public static float floatMin = Float.MIN_VALUE;
|
||||
public static float floatZerro = 0;
|
||||
public static float floatMid = 1;
|
||||
public static float floatMax = Float.MAX_VALUE;
|
||||
public static double doubleMin = Double.MIN_VALUE;
|
||||
public static double doubleZerro = 0;
|
||||
public static double doubleMid = 1;
|
||||
public static double doubleMax = Double.MAX_VALUE;
|
||||
public static char charFirst = '0';
|
||||
public static char charLast = 'Z';
|
||||
public static char wcharFirst = '0';
|
||||
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 stringLast = "112";
|
||||
|
||||
//stacks
|
||||
public Stack byteStack = null;
|
||||
public Stack shortStack = null;
|
||||
public Stack intStack = null;
|
||||
public Stack longStack = null;
|
||||
public Stack ushortStack = null;
|
||||
public Stack uintStack = null;
|
||||
public Stack ulongStack = null;
|
||||
public Stack floatStack = null;
|
||||
public Stack doubleStack = null;
|
||||
public Stack charStack = null;
|
||||
public Stack wcharStack = null;
|
||||
public Stack stringStack = null;
|
||||
//Constructor with stacks initialization
|
||||
public VarContainer() {
|
||||
byteStack = new Stack();
|
||||
byteStack.push(new Byte(byteMin));
|
||||
byteStack.push(new Byte(byteMid));
|
||||
byteStack.push(new Byte(byteMax));
|
||||
shortStack = new Stack();
|
||||
shortStack.push(new Short(shortMin));
|
||||
shortStack.push(new Short(shortMid));
|
||||
shortStack.push(new Short(shortMax));
|
||||
shortStack.push(new Short(shortZerro));
|
||||
intStack = new Stack();
|
||||
intStack.push(new Integer(intMin));
|
||||
intStack.push(new Integer(intMid));
|
||||
intStack.push(new Integer(intMax));
|
||||
intStack.push(new Integer(intZerro));
|
||||
longStack = new Stack();
|
||||
longStack.push(new Long(longMin));
|
||||
longStack.push(new Long(longMid));
|
||||
longStack.push(new Long(longMax));
|
||||
longStack.push(new Long(longZerro));
|
||||
ushortStack = new Stack();
|
||||
ushortStack.push(new Short(ushortMin));
|
||||
ushortStack.push(new Short(ushortMid));
|
||||
ushortStack.push(new Short(ushortMax));
|
||||
uintStack = new Stack();
|
||||
uintStack.push(new Integer(uintMin));
|
||||
uintStack.push(new Integer(uintMid));
|
||||
uintStack.push(new Integer(uintMax));
|
||||
ulongStack = new Stack();
|
||||
ulongStack.push(new Long(ulongMin));
|
||||
ulongStack.push(new Long(ulongMid));
|
||||
ulongStack.push(new Long(ulongMax));
|
||||
floatStack = new Stack();
|
||||
floatStack.push(new Float(floatMin));
|
||||
floatStack.push(new Float(floatMid));
|
||||
floatStack.push(new Float(floatMax));
|
||||
floatStack.push(new Float(floatZerro));
|
||||
doubleStack = new Stack();
|
||||
doubleStack.push(new Double(doubleMin));
|
||||
doubleStack.push(new Double(doubleMid));
|
||||
doubleStack.push(new Double(doubleMax));
|
||||
doubleStack.push(new Double(doubleZerro));
|
||||
charStack = new Stack();
|
||||
charStack.push(new Character(charFirst));
|
||||
charStack.push(new Character(charLast));
|
||||
wcharStack = new Stack();
|
||||
wcharStack.push(new Character(wcharFirst));
|
||||
wcharStack.push(new Character(wcharLast));
|
||||
stringStack = new Stack();
|
||||
stringStack.push(stringFirst);
|
||||
stringStack.push(stringEmpty);
|
||||
stringStack.push(stringNull);
|
||||
stringStack.push(stringLast);
|
||||
|
||||
}
|
||||
|
||||
public byte getNextByte() {
|
||||
try {
|
||||
return ((Byte)byteStack.pop()).byteValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
public short getNextShort() {
|
||||
try {
|
||||
return ((Short)shortStack.pop()).shortValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int getNextInt() {
|
||||
try {
|
||||
return ((Integer)intStack.pop()).intValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
public long getNextLong() {
|
||||
try {
|
||||
return ((Long)longStack.pop()).longValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
public short getNextUshort() {
|
||||
try {
|
||||
return ((Short)ushortStack.pop()).shortValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
|
||||
public int getNextUint() {
|
||||
try {
|
||||
return ((Integer)uintStack.pop()).intValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
public long getNextUlong() {
|
||||
try {
|
||||
return ((Long)ulongStack.pop()).longValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
|
||||
public float getNextFloat() {
|
||||
try {
|
||||
return ((Float)floatStack.pop()).floatValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
public double getNextDouble() {
|
||||
try {
|
||||
return ((Double)doubleStack.pop()).doubleValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return endOfData;
|
||||
}
|
||||
}
|
||||
|
||||
public char getNextChar() {
|
||||
try {
|
||||
return ((Character)charStack.pop()).charValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return (char)endOfData;
|
||||
}
|
||||
}
|
||||
public char getNextWchar() {
|
||||
try {
|
||||
return ((Character)wcharStack.pop()).charValue();
|
||||
}catch(EmptyStackException e) {
|
||||
return (char)endOfData;
|
||||
}
|
||||
}
|
||||
|
||||
public String getNextString() {
|
||||
try {
|
||||
return (String)stringStack.pop();
|
||||
}catch(EmptyStackException e) {
|
||||
return stringLast;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIComponentManager.idl"
|
||||
|
||||
[scriptable, uuid(c254aa00-9084-11d4-aa1b-00a024a8bbac)]
|
||||
interface iClientTestComponent : nsISupports
|
||||
{
|
||||
void Initialize(in string serverProgID);
|
||||
void Execute();
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iClientTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iClientTestComponent
|
||||
*
|
||||
* IID: 0xc254aa00-9084-11d4-aa1b-00a024a8bbac
|
||||
*/
|
||||
|
||||
public interface iClientTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("c254aa00-9084-11d4-aa1b-00a024a8bbac");
|
||||
|
||||
|
||||
/* void Initialize (in string serverProgID); */
|
||||
public void initialize(String serverProgID);
|
||||
|
||||
/* void Execute (); */
|
||||
public void execute();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(f271bdb9-44e8-4f34-a345-490300f1f141)]
|
||||
interface iExclusionSupport : nsISupports
|
||||
{
|
||||
void exclude(in unsigned long count,[array, size_is(count)] in string exclusionList);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iExclusionSupport.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iExclusionSupport
|
||||
*
|
||||
* IID: 0xf271bdb9-44e8-4f34-a345-490300f1f141
|
||||
*/
|
||||
|
||||
public interface iExclusionSupport extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("f271bdb9-44e8-4f34-a345-490300f1f141");
|
||||
|
||||
|
||||
/* void exclude (in unsigned long count, [array, size_is (count)] in string exclusionList); */
|
||||
public void exclude(int count, String[] exclusionList);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIComponentManager.idl"
|
||||
|
||||
[scriptable, uuid(9e5fe0c0-985e-11d4-aa22-00a024a8bbac)]
|
||||
interface iJClientTestComponent : nsISupports
|
||||
{
|
||||
void tHack(in nsIComponentManager cm, in string serverProgID);
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iJClientTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iJClientTestComponent
|
||||
*
|
||||
* IID: 0x9e5fe0c0-985e-11d4-aa22-00a024a8bbac
|
||||
*/
|
||||
|
||||
public interface iJClientTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("9e5fe0c0-985e-11d4-aa22-00a024a8bbac");
|
||||
|
||||
|
||||
/* void tHack (in nsIComponentManager cm, in string serverProgID); */
|
||||
public void tHack(nsIComponentManager cm, String serverProgID);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
82
mozilla/java/xpcom/test/basic/params/TestLoader/makefile.win
Normal file
82
mozilla/java/xpcom/test/basic/params/TestLoader/makefile.win
Normal file
@@ -0,0 +1,82 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..\..\..\..
|
||||
MODULE=BCTestLoader
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
DLLNAME=$(MODULE)
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
JAVAI= iClientTestComponent.java \
|
||||
iJClientTestComponent.java \
|
||||
iExclusionSupport.java
|
||||
|
||||
COMMON_JAVA= VarContainer.java
|
||||
|
||||
XPIDLSRCS= .\BCITestLoader.idl \
|
||||
.\iClientTestComponent.idl \
|
||||
.\iJClientTestComponent.idl \
|
||||
.\iExclusionSupport.idl\
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS=\
|
||||
.\$(OBJDIR)\BCTestLoader.obj \
|
||||
.\$(OBJDIR)\BCTestLoaderFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
LLIBS=\
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(LIBPLC) \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
LINCS=\
|
||||
-I$(PUBLIC)\sample \
|
||||
-I$(PUBLIC)\raptor \
|
||||
-I$(PUBLIC)\xpcom \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
javai:
|
||||
echo $(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI) $(COMMON_JAVA)
|
||||
$(JDKHOME)\bin\javac -classpath $(DEPTH)\dist\classes:$(CLASSPATH) -d $(DEPTH)\dist\classes $(JAVAI) $(COMMON_JAVA)
|
||||
|
||||
#A little temporary hack with messenger
|
||||
install:: $(DLL) javai
|
||||
$(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
|
||||
$(MAKE_INSTALL) Values.h $(DIST)\..\include
|
||||
$(MAKE_INSTALL) VarContainer.h $(DIST)\..\include
|
||||
|
||||
clobber::
|
||||
del /f $(DIST)\..\include\BCTest.h
|
||||
del /f $(DIST)\..\include\ProceedResults.h
|
||||
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
|
||||
11
mozilla/java/xpcom/test/basic/params/TestLoader/start.html
Normal file
11
mozilla/java/xpcom/test/basic/params/TestLoader/start.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tl = Components.classes["@mozilla/blackwood/blackconnect/test/params/TestLoader;1"].createInstance();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
This file can be used to start BlackConnect tests.
|
||||
</body>
|
||||
35
mozilla/java/xpcom/test/basic/params/X2JIN/Makefile.in
Normal file
35
mozilla/java/xpcom/test/basic/params/X2JIN/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
|
||||
DIRS= \
|
||||
java \
|
||||
cpp \
|
||||
$(NULL)
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
53
mozilla/java/xpcom/test/basic/params/X2JIN/cpp/Makefile.in
Normal file
53
mozilla/java/xpcom/test/basic/params/X2JIN/cpp/Makefile.in
Normal file
@@ -0,0 +1,53 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = X2JINClientTestComponent
|
||||
LIBRARY_NAME = $(MODULE)
|
||||
XPIDL_MODULE = $(MODULE)
|
||||
IS_COMPONENT = 1
|
||||
|
||||
CPPSRCS = \
|
||||
X2JINClientTestComponent.cpp \
|
||||
X2JINClientTestComponentFactory.cpp \
|
||||
$(NULL)
|
||||
XPIDLSRCS = iX2JINClientTestComponent.idl
|
||||
|
||||
JAVAI = iX2JINClientTestComponent.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)
|
||||
@@ -0,0 +1,579 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prenv.h"
|
||||
#include "prmem.h"
|
||||
#include "stdio.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "X2JINClientTestComponent.h"
|
||||
#include "nsMemory.h"
|
||||
#include "BCTest.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include "nsString.h"
|
||||
#include "nsStringUtil.h"
|
||||
|
||||
iX2JINServerTestComponent* serverComponent;
|
||||
char* testLocation=NULL;
|
||||
char* logLocation=NULL;
|
||||
char* val=NULL;
|
||||
char** hash=NULL;
|
||||
PRUint8 hashCount=0;
|
||||
PseudoHash* exclusionHash;
|
||||
|
||||
X2JINClientTestComponentImpl::X2JINClientTestComponentImpl() {
|
||||
NS_INIT_REFCNT();
|
||||
testLocation=PR_GetEnv(BC_TEST_LOCATION_VAR_NAME);
|
||||
logLocation=PR_GetEnv(BC_LOG_LOCATION_VAR_NAME);
|
||||
printf("X2JINClientTestComponentImpl::X2JINClientTestComponentImp\n");
|
||||
InitStackVars();
|
||||
hash=(char**)PR_Malloc(sizeof(char*)*50);
|
||||
exclusionHash=new PseudoHash();
|
||||
}
|
||||
|
||||
X2JINClientTestComponentImpl::~X2JINClientTestComponentImpl() {
|
||||
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS3(X2JINClientTestComponentImpl, iX2JINClientTestComponent,
|
||||
iClientTestComponent,iExclusionSupport);
|
||||
IMPL_PROCEED_RESULTS(X2JINClientTestComponentImpl);
|
||||
IMPL_VAR_STACKS(X2JINClientTestComponentImpl);
|
||||
IMPL_PSEUDOHASH(X2JINClientTestComponentImpl);
|
||||
|
||||
/**
|
||||
* This method creates an instance of server test component and
|
||||
* transfers test and log locations to that instance.
|
||||
*/
|
||||
NS_IMETHODIMP X2JINClientTestComponentImpl::Initialize(const char* serverProgID){
|
||||
nsresult rv;
|
||||
rv = nsComponentManager::CreateInstance(serverProgID,
|
||||
nsnull,
|
||||
NS_GET_IID(iX2JINServerTestComponent),
|
||||
(void**)&serverComponent);
|
||||
if (NS_FAILED(rv)) {
|
||||
printf("Create instance failed!!!");
|
||||
return rv;
|
||||
}
|
||||
|
||||
serverComponent->SetTestLocation(testLocation, logLocation);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP X2JINClientTestComponentImpl::Exclude(PRUint32 count, const char **exclusionList) {
|
||||
printf("Debug:ovk:X2JINClientTestComponentImpl::exclude\n");
|
||||
for(int i=0;i<count;i++) {
|
||||
exclusionHash->put((char*)exclusionList[i]);
|
||||
hashCount++;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method executes all tests. See more comments below.
|
||||
*/
|
||||
NS_IMETHODIMP X2JINClientTestComponentImpl::Execute(){
|
||||
|
||||
if (!exclusionHash->containsKey("octet")) TestByte();
|
||||
if (!exclusionHash->containsKey("short")) TestShort();
|
||||
if (!exclusionHash->containsKey("long")) TestLong();
|
||||
if (!exclusionHash->containsKey("longlong")) TestLonglong();
|
||||
if (!exclusionHash->containsKey("ushort")) TestUShort();
|
||||
if (!exclusionHash->containsKey("ulong")) TestULong();
|
||||
if (!exclusionHash->containsKey("ulonglong")) TestULonglong();
|
||||
if (!exclusionHash->containsKey("float")) TestFloat();
|
||||
if (!exclusionHash->containsKey("double")) TestDouble();
|
||||
if (!exclusionHash->containsKey("boolean")) TestBoolean();
|
||||
if (!exclusionHash->containsKey("char")) TestChar();
|
||||
if (!exclusionHash->containsKey("wchar")) TestWChar();
|
||||
if (!exclusionHash->containsKey("string")) TestString();
|
||||
if (!exclusionHash->containsKey("wstring")) TestWString();
|
||||
if (!exclusionHash->containsKey("stringArray")) TestStringArray();
|
||||
if (!exclusionHash->containsKey("longArray")) TestLongArray();
|
||||
if (!exclusionHash->containsKey("charArray")) TestCharArray();
|
||||
if (!exclusionHash->containsKey("mixed")) TestMixed();
|
||||
if (!exclusionHash->containsKey("object")) TestObject();
|
||||
if (!exclusionHash->containsKey("nsIIDRef")) TestIID();
|
||||
if (!exclusionHash->containsKey("nsCIDRef")) TestCID();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for short and transfers
|
||||
* different short values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestShort() {
|
||||
|
||||
PRInt16 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRInt16Vars.size()) {
|
||||
i = PRInt16Vars.top();
|
||||
PRInt16Vars.pop();
|
||||
val=PR_sprintf_append(val,"%d\n",i);
|
||||
serverComponent->TestShort(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.short",val);
|
||||
serverComponent->Flush("short");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for int and transfers
|
||||
* different int values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestLong() {
|
||||
|
||||
PRInt32 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRInt32Vars.size()) {
|
||||
i = PRInt32Vars.top();
|
||||
PRInt32Vars.pop();
|
||||
val=PR_sprintf_append(val,"%d\n",i);
|
||||
serverComponent->TestLong(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.long",val);
|
||||
serverComponent->Flush("long");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for long and transfers
|
||||
* different long values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestLonglong() {
|
||||
|
||||
PRInt64 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRInt64Vars.size()) {
|
||||
i = PRInt64Vars.top();
|
||||
PRInt64Vars.pop();
|
||||
val=PR_sprintf_append(val,"%lld\n",i);
|
||||
serverComponent->TestLonglong(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.longlong",val);
|
||||
serverComponent->Flush("longlong");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for byte and transfers
|
||||
* different byte values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestByte() {
|
||||
|
||||
PRUint8 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRUint8Vars.size()) {
|
||||
i = PRUint8Vars.top();
|
||||
PRUint8Vars.pop();
|
||||
val=PR_sprintf_append(val,"%d\n",i);
|
||||
serverComponent->TestByte(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.octet",val);
|
||||
serverComponent->Flush("octet");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for unsigned short and
|
||||
* transfers different ushort values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestUShort() {
|
||||
|
||||
PRUint16 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRUint16Vars.size()) {
|
||||
i = PRUint16Vars.top();
|
||||
PRUint16Vars.pop();
|
||||
val=PR_sprintf_append(val,"%d\n",i);
|
||||
serverComponent->TestUShort(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.ushort",val);
|
||||
serverComponent->Flush("ushort");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for unsigned int and
|
||||
* transfers different uint values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestULong() {
|
||||
|
||||
PRUint32 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRUint32Vars.size()) {
|
||||
i = PRUint32Vars.top();
|
||||
PRUint32Vars.pop();
|
||||
val=PR_sprintf_append(val,"%d\n",i);
|
||||
serverComponent->TestULong(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.ulong",val);
|
||||
serverComponent->Flush("ulong");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for unsigned long and
|
||||
* transfers different ulong values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestULonglong() {
|
||||
|
||||
PRUint64 i;
|
||||
val=NULL;
|
||||
|
||||
while(PRUint64Vars.size()) {
|
||||
i = PRUint64Vars.top();
|
||||
PRUint64Vars.pop();
|
||||
val=PR_sprintf_append(val,"%lld\n",i);
|
||||
serverComponent->TestULonglong(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.ulonglong",val);
|
||||
serverComponent->Flush("ulonglong");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for float and transfers
|
||||
* different float values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestFloat() {
|
||||
|
||||
float i;
|
||||
val=NULL;
|
||||
|
||||
while(floatVars.size()) {
|
||||
i = floatVars.top();
|
||||
floatVars.pop();
|
||||
val=PR_sprintf_append(val,"%.3e\n",i);
|
||||
serverComponent->TestFloat(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.float",val);
|
||||
serverComponent->Flush("float");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for double and transfers
|
||||
* different double values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestDouble() {
|
||||
|
||||
double i;
|
||||
val=NULL;
|
||||
|
||||
while(doubleVars.size()) {
|
||||
i = doubleVars.top();
|
||||
doubleVars.pop();
|
||||
val=PR_sprintf_append(val,"%.3e\n",i);
|
||||
serverComponent->TestDouble(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.double",val);
|
||||
serverComponent->Flush("double");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for boolean and transfers
|
||||
* different boolean values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestBoolean() {
|
||||
|
||||
PRBool i;
|
||||
val=NULL;
|
||||
|
||||
while(PRBoolVars.size()) {
|
||||
i = PRBoolVars.top();
|
||||
PRBoolVars.pop();
|
||||
if (i==PR_TRUE) val=PR_sprintf_append(val,"true\n");
|
||||
else if (i==PR_FALSE) val=PR_sprintf_append(val,"false\n");
|
||||
else val=PR_sprintf_append(val,"strange result\n");
|
||||
serverComponent->TestBoolean(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.boolean",val);
|
||||
serverComponent->Flush("boolean");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for char and transfers
|
||||
* different char values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestChar() {
|
||||
|
||||
char i;
|
||||
val=NULL;
|
||||
|
||||
while(charVars.size()) {
|
||||
i = charVars.top();
|
||||
charVars.pop();
|
||||
val=PR_sprintf_append(val,"%c\n",i);
|
||||
serverComponent->TestChar(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.char",val);
|
||||
serverComponent->Flush("char");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for PRUnichar and transfers
|
||||
* different PRUnichar values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestWChar() {
|
||||
|
||||
PRUnichar i;
|
||||
val=NULL;
|
||||
|
||||
while(wcharVars.size()) {
|
||||
i = wcharVars.top();
|
||||
wcharVars.pop();
|
||||
val=PR_sprintf_append(val,"%c\n",i);
|
||||
serverComponent->TestWChar(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.wchar",val);
|
||||
serverComponent->Flush("wchar");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for char* and transfers
|
||||
* different char* values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestString() {
|
||||
|
||||
char* i;
|
||||
val=NULL;
|
||||
|
||||
while(stringVars.size()) {
|
||||
i = stringVars.top();
|
||||
stringVars.pop();
|
||||
val=PR_sprintf_append(val,"%s\n",i);
|
||||
serverComponent->TestString(i);
|
||||
}
|
||||
|
||||
PrintResult("x2j.in.client.string",val);
|
||||
serverComponent->Flush("string");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for PRUnichar* and transfers
|
||||
* different PRUnichar* values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestWString() {
|
||||
val=NULL;
|
||||
|
||||
PRUnichar* _wstring;
|
||||
char* _string="Test wstring";
|
||||
|
||||
nsCString* cstr=new nsCString(_string);
|
||||
_wstring=cstr->ToNewUnicode();
|
||||
|
||||
nsString str = *(new nsString(_wstring));
|
||||
|
||||
NS_ALLOC_STR_BUF(aBuf,str,14)
|
||||
val=PR_sprintf_append(val,"%s\n",aBuf);
|
||||
NS_FREE_STR_BUF(aBuf)
|
||||
|
||||
serverComponent->TestWString(_wstring);
|
||||
|
||||
PrintResult("x2j.in.client.wstring",val);
|
||||
serverComponent->Flush("wstring");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for char* array and transfers
|
||||
* char* array to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestStringArray() {
|
||||
|
||||
PRUint32 count=3;
|
||||
const char** _stringArray=(const char**)PR_Malloc(sizeof(const char*)*count);
|
||||
_stringArray[0]="ctrl-f";
|
||||
_stringArray[1]="iddqd";
|
||||
_stringArray[2]="idkfa";
|
||||
|
||||
PrintResultArray("x2j.in.client.stringArray",count,_stringArray);
|
||||
serverComponent->TestStringArray(count,_stringArray);
|
||||
serverComponent->Flush("stringArray");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for int array and transfers
|
||||
* int array to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestLongArray() {
|
||||
|
||||
PRUint32 count=3;
|
||||
PRInt32* _intArray=(PRInt32*)PR_Malloc(sizeof(PRInt32)*count);
|
||||
_intArray[0]=3;
|
||||
_intArray[1]=4;
|
||||
_intArray[2]=5;
|
||||
|
||||
PrintResultArray("x2j.in.client.longArray",count,_intArray);
|
||||
serverComponent->TestLongArray(count,_intArray);
|
||||
serverComponent->Flush("longArray");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for char array and transfers
|
||||
* char array to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestCharArray() {
|
||||
|
||||
PRUint32 count=3;
|
||||
char* _charArray=(char*)PR_Malloc(sizeof(char)*count);
|
||||
_charArray[0]='x';
|
||||
_charArray[1]='y';
|
||||
_charArray[2]='z';
|
||||
|
||||
PrintResultArray("x2j.in.client.charArray",count,_charArray);
|
||||
serverComponent->TestCharArray(count,_charArray);
|
||||
serverComponent->Flush("charArray");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for misc values and transfers
|
||||
* these values to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestMixed() {
|
||||
PRBool _bool=true;
|
||||
char _char='s';
|
||||
PRUint8 _byte=3;
|
||||
PRInt16 _short=3;
|
||||
PRUint16 _ushort=3;
|
||||
PRInt32 _int=3;
|
||||
PRUint32 _uint=3;
|
||||
PRInt64 _long=3;
|
||||
PRUint64 _ulong=3;
|
||||
float _float=7;
|
||||
double _double=7;
|
||||
char* _string="abc";
|
||||
PRUint32 count=3;
|
||||
PRInt32* _intArray=(PRInt32*)PR_Malloc(sizeof(PRInt32)*count);
|
||||
_intArray[0]=8;
|
||||
_intArray[1]=9;
|
||||
_intArray[2]=10;
|
||||
|
||||
PrintResultMixed("x2j.in.client.mixed",_bool, _char, _byte, _short,
|
||||
_ushort, _int, _uint, _long, _ulong, _float,
|
||||
_double, _string, count, _intArray);
|
||||
|
||||
serverComponent->TestMixed(_bool, _char, _byte, _short, _ushort,
|
||||
_int, _uint, _long, _ulong, _float,
|
||||
_double, _string, count, _intArray);
|
||||
serverComponent->Flush("mixed");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for object and transfers
|
||||
* serverComponent object to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestObject() {
|
||||
PrintResult("x2j.in.client.object","!!!Right string!!!");
|
||||
serverComponent->TestObject(serverComponent);
|
||||
serverComponent->Flush("object");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for IID and transfers
|
||||
* IID object to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestIID() {
|
||||
|
||||
const nsIID& iid=NS_GET_IID(iX2JINServerTestComponent);
|
||||
val=NULL;
|
||||
|
||||
val=iid.ToString();
|
||||
|
||||
val=PR_sprintf_append(val,"%s\n",val);
|
||||
PrintResult("x2j.in.client.iid",val);
|
||||
serverComponent->TestIID(iid);
|
||||
serverComponent->Flush("iid");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets C++ side test results for CID and transfers
|
||||
* CID object to java side.
|
||||
* At the end of this method the flush(...) method is invoked to set
|
||||
* results on java side.
|
||||
*/
|
||||
void X2JINClientTestComponentImpl::TestCID() {
|
||||
|
||||
NS_DEFINE_CID(cid,X2JINCLIENTTESTCOMPONENT_CID);
|
||||
val=NULL;
|
||||
|
||||
val=cid.ToString();
|
||||
|
||||
val=PR_sprintf_append(val,"%s\n",val);
|
||||
PrintResult("x2j.in.client.cid",val);
|
||||
serverComponent->TestCID(cid);
|
||||
serverComponent->Flush("cid");
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "iX2JINClientTestComponent.h"
|
||||
#include "iX2JINServerTestComponent.h"
|
||||
#include "iClientTestComponent.h"
|
||||
#include "iExclusionSupport.h"
|
||||
#include "ProceedResults.h"
|
||||
#include "VarContainer.h"
|
||||
#include "PseudoHash.h"
|
||||
|
||||
class X2JINClientTestComponentImpl : public iX2JINClientTestComponent,
|
||||
public iClientTestComponent,
|
||||
public iExclusionSupport
|
||||
{
|
||||
public:
|
||||
X2JINClientTestComponentImpl();
|
||||
virtual ~X2JINClientTestComponentImpl();
|
||||
void TestByte(void);
|
||||
void TestShort(void);
|
||||
void TestLong(void);
|
||||
void TestLonglong(void);
|
||||
void TestUShort(void);
|
||||
void TestULong(void);
|
||||
void TestULonglong(void);
|
||||
void TestFloat(void);
|
||||
void TestDouble(void);
|
||||
void TestBoolean(void);
|
||||
void TestChar(void);
|
||||
void TestWChar(void);
|
||||
void TestString(void);
|
||||
void TestWString(void);
|
||||
void TestStringArray(void);
|
||||
void TestLongArray(void);
|
||||
void TestCharArray(void);
|
||||
void TestMixed(void);
|
||||
void TestObject(void);
|
||||
void TestIID(void);
|
||||
void TestCID(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_ICLIENTTESTCOMPONENT
|
||||
NS_DECL_IEXCLUSIONSUPPORT
|
||||
|
||||
DECL_PROCEED_RESULTS
|
||||
DECL_VAR_STACKS
|
||||
};
|
||||
DECL_PSEUDOHASH
|
||||
@@ -0,0 +1,42 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
|
||||
#include "X2JINClientTestComponent.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(X2JINClientTestComponentImpl)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "X2JIN Client Test Component",
|
||||
X2JINCLIENTTESTCOMPONENT_CID,
|
||||
X2JINCLIENTTESTCOMPONENT_PROGID,
|
||||
X2JINClientTestComponentImplConstructor,
|
||||
NULL /* NULL if you dont need one */,
|
||||
NULL /* NULL if you dont need one */
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("X2JINClientTestComponentFactory", components)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "iClientTestComponent.idl"
|
||||
|
||||
[scriptable, uuid(02748330-9086-11d4-9d38-00a024a8bb88)]
|
||||
interface iX2JINClientTestComponent : nsISupports
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
#define X2JINCLIENTTESTCOMPONENT_CID \
|
||||
{ /*16027d70-9086-11d4-9d38-00a024a8bb88*/ \
|
||||
0x16027d70, \
|
||||
0x9086, \
|
||||
0x11d4, \
|
||||
{0x9d, 0x38, 0x00, 0xa0, 0x24, 0xa8, 0xbb, 0x88} \
|
||||
}
|
||||
|
||||
#define X2JINCLIENTTESTCOMPONENT_PROGID "@mozilla/blackwood/blackconnect/test/params/X2JINClient;1"
|
||||
|
||||
%}
|
||||
|
||||
|
||||
51
mozilla/java/xpcom/test/basic/params/X2JIN/cpp/makefile.win
Normal file
51
mozilla/java/xpcom/test/basic/params/X2JIN/cpp/makefile.win
Normal file
@@ -0,0 +1,51 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=..\..\..\..\..\..\..
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = X2JINClientTestComponent
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MODULE = X2JINClientTestComponent
|
||||
COMPONENT = 1
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\iX2JINClientTestComponent.idl \
|
||||
$(NULL)
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\X2JINClientTestComponent.obj \
|
||||
.\$(OBJDIR)\X2JINClientTestComponentFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
LLIBS= $(LLIBS) $(LIBNSPR) $(DIST)\lib\xpcom.lib
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(DLL) $(DIST)\bin\components
|
||||
clobber::
|
||||
del /f $(DIST)\bin\components\$(DLLNAME).dll
|
||||
del /f $(DIST)\bin\components\X2JIN*.xpt
|
||||
59
mozilla/java/xpcom/test/basic/params/X2JIN/java/Makefile.in
Normal file
59
mozilla/java/xpcom/test/basic/params/X2JIN/java/Makefile.in
Normal file
@@ -0,0 +1,59 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Client QA Team, St. Petersburg, Russia
|
||||
#
|
||||
|
||||
DEPTH=../../../../../../..
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
XPIDLSRCS = iX2JINServerTestComponent.idl
|
||||
XPIDL_MODULE = X2JINServerTestComponent
|
||||
JAVA_OR_NSJVM = 1
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
JAVA_SRC=X2JINServerTestComponent.java
|
||||
|
||||
JAVAI_SRC=iX2JINServerTestComponent.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
|
||||
cp -f X2JINServerTestComponent.jar* $(DIST)/bin/components
|
||||
|
||||
clobber::
|
||||
rm -f *.class *.jar.comp
|
||||
rm -f $(DIST)/bin/components/X2JINServerTestComponent.jar.*
|
||||
clobber_all:: clobber
|
||||
install:: install-component
|
||||
@@ -0,0 +1,2 @@
|
||||
9f3e8810-9092-11d4-9d38-00a024a8bb88
|
||||
@mozilla/blackwood/blackconnect/test/params/X2JINServer;1
|
||||
@@ -0,0 +1,310 @@
|
||||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
import org.mozilla.xpcom.*;
|
||||
import java.lang.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.io.*;
|
||||
|
||||
public class X2JINServerTestComponent implements iX2JINServerTestComponent {
|
||||
|
||||
private static String testLocation=null;
|
||||
private static String logLocation=null;
|
||||
private String S="";
|
||||
|
||||
public X2JINServerTestComponent() {
|
||||
System.out.println("--[java] X2JINServerTestComponent constructor");
|
||||
}
|
||||
|
||||
public Object queryInterface(IID iid) {
|
||||
System.out.println("--[java]X2JINServerTestComponent::queryInterface iid="+iid);
|
||||
if (iid.equals(nsISupports.IID)
|
||||
|| iid.equals(iX2JINServerTestComponent.IID)) {
|
||||
return this;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets locations, which are passed from C++ client
|
||||
* side.
|
||||
* First parameter - test location,
|
||||
* Second parameter - log location.
|
||||
*/
|
||||
public void setTestLocation(String location, String location2) {
|
||||
testLocation=location;
|
||||
logLocation=location2;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method writes server side test result to a log file.
|
||||
* These test results were accumulated in apropriated test
|
||||
* methods. This method takes tested type as parameter.
|
||||
*/
|
||||
public void flush(String name) {
|
||||
try{
|
||||
DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/x2j.in.server."+name));
|
||||
f.writeBytes(S);
|
||||
} catch(Exception e) {
|
||||
System.out.println("Exception during writing the file");
|
||||
}
|
||||
S="";
|
||||
}
|
||||
|
||||
/****************************************/
|
||||
/* TEST METHODS */
|
||||
/****************************************/
|
||||
|
||||
/**
|
||||
* This method accumulates short values, which are passed from C++
|
||||
* client side.
|
||||
*/
|
||||
public void testShort(short i) {
|
||||
S=S+new Short(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates int values, which are passed from C++
|
||||
* client side.
|
||||
*/
|
||||
public void testLong(int i) {
|
||||
S=S+new Integer(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates long values, which are passed from C++
|
||||
* client side.
|
||||
*/
|
||||
public void testLonglong(long i) {
|
||||
S=S+new Long(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates byte values, which are passed from C++
|
||||
* client side.
|
||||
*/
|
||||
public void testByte(byte i) {
|
||||
S=S+new Byte(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates short values (unsigned short on C++
|
||||
* side), which are passed from C++ client side.
|
||||
*/
|
||||
public void testUShort(short i) {
|
||||
S=S+new Short(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates int values (unsigned int on C++
|
||||
* side), which are passed from C++ client side.
|
||||
*/
|
||||
public void testULong(int i) {
|
||||
S=S+new Integer(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates long values (unsigned long on C++
|
||||
* side), which are passed from C++ client side.
|
||||
*/
|
||||
public void testULonglong(long i) {
|
||||
S=S+new Long(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates float values, which are passed from C++
|
||||
* client side.
|
||||
*/
|
||||
public void testFloat(float i) {
|
||||
S=S+new Float(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates double values, which are passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testDouble(double i) {
|
||||
S=S+new Double(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates boolean values, which are passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testBoolean(boolean i) {
|
||||
S=S+new Boolean(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates char values, which are passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testChar(char i) {
|
||||
S=S+new Character(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates char values (wchar on C++ side),
|
||||
* which are passed from C++ client side.
|
||||
*/
|
||||
public void testWChar(char i) {
|
||||
S=S+new Character(i).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates String values, which are passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testString(String i) {
|
||||
S=S+i+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates String values (wstring on C++ side),
|
||||
* which are passed from C++ client side.
|
||||
*/
|
||||
public void testWString(String i) {
|
||||
S=S+i+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates String array values, which are passed
|
||||
* from C++ client side.
|
||||
* First parameter - number of an array elements.
|
||||
*/
|
||||
public void testStringArray(int count, String[] stringArray) {
|
||||
for(int j=0;j<count;j++)
|
||||
S=S+stringArray[j]+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates int array values, which are passed
|
||||
* from C++ client side.
|
||||
* First parameter - number of an array elements.
|
||||
*/
|
||||
public void testLongArray(int count, int[] intArray) {
|
||||
for(int j=0;j<count;j++)
|
||||
S=S+new Integer(intArray[j]).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates char array values, which are passed
|
||||
* from C++ client side.
|
||||
* First parameter - number of an array elements.
|
||||
*/
|
||||
public void testCharArray(int count, char[] charArray) {
|
||||
for(int j=0;j<count;j++)
|
||||
S=S+new Character(charArray[j]).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method accumulates misc values, which are passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testMixed(boolean _bool, char _char, byte _byte,
|
||||
short _short, short _ushort, int _int,
|
||||
int _uint, long _long, long _ulong,
|
||||
float _float, double _double, String _string,
|
||||
int count, int[] _intArray) {
|
||||
S=S+new Boolean(_bool).toString()+"\n";
|
||||
S=S+new Character(_char).toString()+"\n";
|
||||
S=S+new Byte(_byte).toString()+"\n";
|
||||
S=S+new Short(_short).toString()+"\n";
|
||||
S=S+new Short(_ushort).toString()+"\n";
|
||||
S=S+new Integer(_int).toString()+"\n";
|
||||
S=S+new Integer(_uint).toString()+"\n";
|
||||
S=S+new Long(_long).toString()+"\n";
|
||||
S=S+new Long(_ulong).toString()+"\n";
|
||||
S=S+new Float(_float).toString()+"\n";
|
||||
S=S+new Double(_double).toString()+"\n";
|
||||
S=S+_string+"\n";
|
||||
for(int j=0;j<count;j++)
|
||||
S=S+new Integer(_intArray[j]).toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method try to invoke testObj() method,
|
||||
* using iX2JINServerTestComponent value, which is passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testObject(iX2JINServerTestComponent obj) {
|
||||
try{
|
||||
obj.testObj();
|
||||
} catch(Exception e) {
|
||||
System.out.println("EXC in TESTOBJ");
|
||||
S=S+"Exception in TestObject: "+e+"\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets correct result string for testObject(...)
|
||||
* method.
|
||||
*/
|
||||
public void testObj() {
|
||||
System.out.println("TESTOBJ");
|
||||
S=S+"!!!Right string!!!"+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method gets IID value, which is passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testIID(IID iid) {
|
||||
S=S+iid.toString()+"\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method gets CID value, which is passed from
|
||||
* C++ client side.
|
||||
*/
|
||||
public void testCID(CID cid) {
|
||||
S=S+cid.toString()+"\n";
|
||||
//CID c=new CID("1ddc5b10-9852-11d4-aa22-00a024a8bbac");
|
||||
}
|
||||
|
||||
/****************************************/
|
||||
/* /TEST METHODS */
|
||||
/****************************************/
|
||||
|
||||
|
||||
|
||||
static {
|
||||
try {
|
||||
Class nsISupportsStringClass = Class.forName("org.mozilla.xpcom.nsISupportsString");
|
||||
Class iX2JINServerTestComponentClass = Class.forName("org.mozilla.xpcom.iX2JINServerTestComponent");
|
||||
Class nsIComponentManagerClass = Class.forName("org.mozilla.xpcom.nsIComponentManager");
|
||||
Class nsIFactoryClass = Class.forName("org.mozilla.xpcom.nsIFactory");
|
||||
Class nsIEnumeratorClass = Class.forName("org.mozilla.xpcom.nsIEnumerator");
|
||||
|
||||
InterfaceRegistry.register(nsIComponentManagerClass);
|
||||
InterfaceRegistry.register(nsIFactoryClass);
|
||||
InterfaceRegistry.register(nsIEnumeratorClass);
|
||||
InterfaceRegistry.register(iX2JINServerTestComponentClass);
|
||||
InterfaceRegistry.register(nsISupportsStringClass);
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
|
||||
The contents of this file are subject to the Mozilla Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are
|
||||
Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Client QA Team, St. Petersburg, Russia
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(9f3e8810-9092-11d4-9d38-00a024a8bb88)]
|
||||
interface iX2JINServerTestComponent : nsISupports {
|
||||
void setTestLocation(in string testLocation, in string logLocation);
|
||||
void flush(in string name);
|
||||
void testShort(in short i);
|
||||
void testLong(in long i);
|
||||
void testLonglong(in long long i);
|
||||
void testByte(in octet i);
|
||||
void testUShort(in unsigned short i);
|
||||
void testULong(in unsigned long i);
|
||||
void testULonglong(in unsigned long long i);
|
||||
void testFloat(in float i);
|
||||
void testDouble(in double i);
|
||||
void testBoolean(in boolean i);
|
||||
void testChar(in char 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 stringArray);
|
||||
void testLongArray(in unsigned long count,
|
||||
[array, size_is(count)] in long intArray);
|
||||
void testCharArray(in unsigned long count,
|
||||
[array, size_is(count)] in char charArray);
|
||||
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 intArray);
|
||||
void testObject(in iX2JINServerTestComponent obj);
|
||||
void testObj();
|
||||
void testIID(in nsIIDRef iid);
|
||||
void testCID(in nsCIDRef cid);
|
||||
};
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* ************* DO NOT EDIT THIS FILE ***********
|
||||
*
|
||||
* This file was automatically generated from iX2JINServerTestComponent.idl.
|
||||
*/
|
||||
|
||||
|
||||
package org.mozilla.xpcom;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iX2JINServerTestComponent
|
||||
*
|
||||
* IID: 0x9f3e8810-9092-11d4-9d38-00a024a8bb88
|
||||
*/
|
||||
|
||||
public interface iX2JINServerTestComponent extends nsISupports
|
||||
{
|
||||
public static final IID IID =
|
||||
new IID("9f3e8810-9092-11d4-9d38-00a024a8bb88");
|
||||
|
||||
|
||||
/* void setTestLocation (in string testLocation, in string logLocation); */
|
||||
public void setTestLocation(String testLocation, String logLocation);
|
||||
|
||||
/* void flush (in string name); */
|
||||
public void flush(String name);
|
||||
|
||||
/* void testShort (in short i); */
|
||||
public void testShort(short i);
|
||||
|
||||
/* void testLong (in long i); */
|
||||
public void testLong(int i);
|
||||
|
||||
/* void testLonglong (in long long i); */
|
||||
public void testLonglong(long i);
|
||||
|
||||
/* void testByte (in octet i); */
|
||||
public void testByte(byte i);
|
||||
|
||||
/* void testUShort (in unsigned short i); */
|
||||
public void testUShort(short i);
|
||||
|
||||
/* void testULong (in unsigned long i); */
|
||||
public void testULong(int i);
|
||||
|
||||
/* void testULonglong (in unsigned long long i); */
|
||||
public void testULonglong(long i);
|
||||
|
||||
/* void testFloat (in float i); */
|
||||
public void testFloat(float i);
|
||||
|
||||
/* void testDouble (in double i); */
|
||||
public void testDouble(double i);
|
||||
|
||||
/* void testBoolean (in boolean i); */
|
||||
public void testBoolean(boolean i);
|
||||
|
||||
/* void testChar (in char i); */
|
||||
public void testChar(char i);
|
||||
|
||||
/* void testWChar (in wchar i); */
|
||||
public void testWChar(char i);
|
||||
|
||||
/* void TestString (in string i); */
|
||||
public void testString(String i);
|
||||
|
||||
/* void TestWString (in wstring i); */
|
||||
public void testWString(String i);
|
||||
|
||||
/* void testStringArray (in unsigned long count, [array, size_is (count)] in string stringArray); */
|
||||
public void testStringArray(int count, String[] stringArray);
|
||||
|
||||
/* void testLongArray (in unsigned long count, [array, size_is (count)] in long intArray); */
|
||||
public void testLongArray(int count, int[] intArray);
|
||||
|
||||
/* void testCharArray (in unsigned long count, [array, size_is (count)] in char charArray); */
|
||||
public void testCharArray(int count, char[] charArray);
|
||||
|
||||
/* 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 intArray); */
|
||||
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[] intArray);
|
||||
|
||||
/* void testObject (in iX2JINServerTestComponent obj); */
|
||||
public void testObject(iX2JINServerTestComponent obj);
|
||||
|
||||
/* void testObj (); */
|
||||
public void testObj();
|
||||
|
||||
/* void testIID (in nsIIDRef iid); */
|
||||
public void testIID(IID iid);
|
||||
|
||||
/* void testCID (in nsCIDRef cid); */
|
||||
public void testCID(CID cid);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* end
|
||||
*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user