*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:
idk%eng.sun.com
2001-05-24 05:22:13 +00:00
parent d74ff774aa
commit 6e4a0fdecc
214 changed files with 17250 additions and 0 deletions

View 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 = iX2JINOUTServerTestComponent.idl
XPIDL_MODULE = X2JINOUTServerTestComponent
JAVA_OR_NSJVM = 1
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
JAVA_SRC=X2JINOUTServerTestComponent.java
JAVAI_SRC=iX2JINOUTServerTestComponent.java
X2JINOUTServerTestComponent.jar.comp: manifest X2JINOUTServerTestComponent.class
$(JDKHOME)/bin/jar cvfm X2JINOUTServerTestComponent.jar.comp manifest *.class
X2JINOUTServerTestComponent.class:
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes $(JAVA_SRC)
javai::
$(JDKHOME)/bin/javac -classpath $(DEPTH)/dist/classes -d $(DEPTH)/dist/classes $(JAVAI_SRC)
install-component: javai X2JINOUTServerTestComponent.jar.comp X2JINOUTServerTestComponent.jar.info
cp -f X2JINOUTServerTestComponent.jar* $(DIST)/bin/components
clobber::
rm -f *.class *.jar.comp
rm -f $(DIST)/bin/components/X2JINOUTServerTestComponent.jar.*
clobber_all:: clobber
install:: install-component

View File

@@ -0,0 +1,2 @@
457f2290-9abc-11d4-9d3b-00a024a8bb88
@mozilla/blackwood/blackconnect/test/params/X2JINOUTServer;1

View File

@@ -0,0 +1,331 @@
/* -*- 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 X2JINOUTServerTestComponent implements iX2JINOUTServerTestComponent {
private static String testLocation=null;
private static String logLocation=null;
private int all=0;
private String S="";
public X2JINOUTServerTestComponent() {
System.out.println("--[java] X2JINOUTServerTestComponent constructor");
}
public Object queryInterface(IID iid) {
System.out.println("--[java]X2JINOUTServerTestComponent::queryInterface iid="+iid);
if ( iid.equals(nsISupports.IID)
|| iid.equals(iX2JINOUTServerTestComponent.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.inout.server."+name));
f.writeBytes(S);
}catch(Exception e) {
System.out.println("Exception during writing the file");
}
S="";
all=0;
}
/****************************************/
/* TEST METHODS */
/****************************************/
/**
* This method accumulates short values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testShort(short[] i) {
S=S+new Short(i[0]).toString()+"\n";
}
/**
* This method accumulates int values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testLong(int[] i) {
S=S+new Integer(i[0]).toString()+"\n";
}
/**
* This method accumulates long values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testLonglong(long[] i) {
S=S+new Long(i[0]).toString()+"\n";
}
/**
* This method accumulates byte values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testByte(byte[] i) {
S=S+new Byte(i[0]).toString()+"\n";
}
/**
* This method accumulates short values, which are passed from C++
* client side and transfers them back to C++ side as unsigned short.
*/
public void testUShort(short[] i) {
S=S+new Short(i[0]).toString()+"\n";
}
/**
* This method accumulates int values, which are passed from C++
* client side and transfers them back to C++ side as unsigned int.
*/
public void testULong(int[] i) {
S=S+new Integer(i[0]).toString()+"\n";
}
/**
* This method accumulates long values, which are passed from C++
* client side and transfers them back to C++ side as unsigned long.
*/
public void testULonglong(long[] i) {
S=S+new Long(i[0]).toString()+"\n";
}
/**
* This method accumulates float values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testFloat(float[] i) {
S=S+new Float(i[0]).toString()+"\n";
}
/**
* This method accumulates double values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testDouble(double[] i) {
S=S+new Double(i[0]).toString()+"\n";
}
/**
* This method accumulates boolean values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testBoolean(boolean[] i) {
S=S+new Boolean(i[0]).toString()+"\n";
}
/**
* This method accumulates char values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testChar(char[] i) {
S=S+new Character(i[0]).toString()+"\n";
}
/**
* This method accumulates char values, which are passed from C++
* client side and transfers them back to C++ side as PRUnichar.
*/
public void testWChar(char[] i) {
S=S+i[0]+"\n";
}
/**
* This method accumulates string values, which are passed from C++
* client side and transfers them back to C++ side.
*/
public void testString(String[] i) {
S=S+i[0]+"\n";
}
/**
* This method accumulates string values, which are passed from C++
* client side and transfers them back to C++ side as PRUnichar*.
*/
public void testWString(String[] i) {
S=S+i[0]+"\n";
all++;
if (all==2) {
flush("wstring");
}
}
/**
* This method accumulates string array values, which are passed
* from C++ client side and transfers them back to C++ side.
*/
public void testStringArray(int count, String[][] stringArray) {
for(int i=0;i<count;i++)
S=S+stringArray[0][i]+"\n";
flush("stringArray");
}
/**
* This method accumulates int array values, which are passed
* from C++ client side and transfers them back to C++ side.
*/
public void testLongArray(int count, int[][] intArray) {
for(int i=0;i<count;i++)
S=S+new Integer(intArray[0][i]).toString()+"\n";
flush("longArray");
}
/**
* This method accumulates char array values, which are passed
* from C++ client side and transfers them back to C++ side.
*/
public void testCharArray(int count, char[][] charArray) {
for(int i=0;i<count;i++)
S=S+charArray[0][i]+"\n";
flush("charArray");
}
/**
* This method accumulates misc values, which are passed
* from C++ client side and transfers them back to C++ 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[0]).toString()+"\n"+
new Character(_char[0]).toString()+"\n"+
new Byte(_byte[0]).toString()+"\n"+
new Short(_short[0]).toString()+"\n"+
new Short(_ushort[0]).toString()+"\n"+
new Integer(_int[0]).toString()+"\n"+
new Integer(_uint[0]).toString()+"\n"+
new Long(_long[0]).toString()+"\n"+
new Long(_ulong[0]).toString()+"\n"+
new Float(_float[0]).toString()+"\n"+
new Double(_double[0]).toString()+"\n"+
_string[0]+"\n";
for(int i=0;i<count;i++)
S=S+new Integer(_intArray[0][i]).toString()+"\n";
flush("mixed");
}
/**
* This method gets iX2JINOUTServerTestComponent object, which is
* passed from C++ client side and invokes testObj() method to set
* java side test result.
*/
public void testObject(iX2JINOUTServerTestComponent[] obj) {
obj[0].testObj();
}
/**
* This method sets first java side test result.
*/
public void testObj() {
S="!!!Right string!!!";
flush("object");
}
/**
* This method sets iX2JINOUTServerTestComponent object, which will
* be pass to C++ client side.
*/
public void testObject2(iX2JINOUTServerTestComponent[] obj) {
obj[0]=this;
}
/**
* This method sets second java side test result.
*/
public void testObj2() {
try{
DataOutputStream f=new DataOutputStream(new FileOutputStream(logLocation+"/x2j.inout.xclient.object"));
f.writeBytes("!!!Right string!!!");
} catch(Exception e) {
System.out.println("Exception during writing the file");
}
}
/**
* This method gets IID value, which is passed from
* C++ client side and transfers them back to C++ side..
*/
/* public void testIID(IID[] iid) {
S=S+iid.toString()+"\n";
flush("iid");
}*/
/**
* This method gets CID value, which is passed from
* C++ client side and transfers them back to C++ side..
*/
/* public void testCID(CID[] cid) {
S=S+cid.toString()+"\n";
flush("cid");
}*/
/****************************************/
/* /TEST METHODS */
/****************************************/
static {
try {
Class nsISupportsStringClass = Class.forName("org.mozilla.xpcom.nsISupportsString");
Class iX2JINOUTServerTestComponentClass = Class.forName("iX2JINOUTServerTestComponent");
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(iX2JINOUTServerTestComponentClass);
InterfaceRegistry.register(nsISupportsStringClass);
}catch (Exception e) {
System.out.println(e);
}
}
};

View File

@@ -0,0 +1,64 @@
/* -*- 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(457f2290-9abc-11d4-9d3b-00a024a8bb88)]
interface iX2JINOUTServerTestComponent : nsISupports {
void setTestLocation(in string testLocation, in string logLocation);
void flush(in string name);
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 iX2JINOUTServerTestComponent obj);
void testObject2(inout iX2JINOUTServerTestComponent obj2);
void testObj();
void testObj2();
// void testIID(inout nsIIDRef iid);
// void testCID(inout nsCIDRef cid);
};

View File

@@ -0,0 +1,99 @@
/*
* ************* DO NOT EDIT THIS FILE ***********
*
* This file was automatically generated from iX2JINOUTServerTestComponent.idl.
*/
package org.mozilla.xpcom;
/**
* Interface iX2JINOUTServerTestComponent
*
* IID: 0x457f2290-9abc-11d4-9d3b-00a024a8bb88
*/
public interface iX2JINOUTServerTestComponent extends nsISupports
{
public static final IID IID =
new IID("457f2290-9abc-11d4-9d3b-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 (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 iX2JINOUTServerTestComponent obj); */
public void testObject(iX2JINOUTServerTestComponent[] obj);
/* void testObject2 (inout iX2JINOUTServerTestComponent obj2); */
public void testObject2(iX2JINOUTServerTestComponent[] obj2);
/* void testObj (); */
public void testObj();
/* void testObj2 (); */
public void testObj2();
}
/*
* end
*/

View File

@@ -0,0 +1,55 @@
#!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 = .
MODULE=X2JINOUTServerTestComponent
COMPONENT=1
XPIDLSRCS = \
.\iX2JINOUTServerTestComponent.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>
X2JINOUTServerTestComponent.jar.comp: manifest iX2JINOUTServerTestComponent.class X2JINOUTServerTestComponent.class
$(JDKHOME)\bin\jar cvfm X2JINOUTServerTestComponent.jar.comp manifest *.class
.SUFFIXES: .java .class
.java.class:
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) -d $(DEPTH)\dist\classes iX2JINOUTServerTestComponent.java
$(JDKHOME)\bin\javac -classpath $(CLASSPATH) X2JINOUTServerTestComponent.java
install-component: X2JINOUTServerTestComponent.jar.comp X2JINOUTServerTestComponent.jar.info $(DLL)
copy X2JINOUTServerTestComponent.jar* $(DIST)\bin\components
clobber::
-del /f *.class *.jar.comp
-del /f $(DIST)\bin\components\X2JINOUTServerTestComponent.jar.*
-del /f $(DIST)\..\classes\org\mozilla\xpcom\iX2JINOUTServerTestComponent.*
clobber_all:: clobber
install:: install-component

View File

@@ -0,0 +1 @@
Component-Class: X2JINOUTServerTestComponent