From 280bcbeebdc16df87fd48c9e3b691e9479c654d7 Mon Sep 17 00:00:00 2001 From: "jgellman%netscape.com" Date: Mon, 26 Oct 1998 21:26:20 +0000 Subject: [PATCH] added start of test harness git-svn-id: svn://10.0.0.236/trunk@13483 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/rdf/tests/makefile.win | 38 +++++++++ mozilla/rdf/tests/rdftest.cpp | 43 ++++++++++ mozilla/rdf/tests/sitemap.rdf | 148 +++++++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 mozilla/rdf/tests/makefile.win create mode 100644 mozilla/rdf/tests/rdftest.cpp create mode 100644 mozilla/rdf/tests/sitemap.rdf diff --git a/mozilla/rdf/tests/makefile.win b/mozilla/rdf/tests/makefile.win new file mode 100644 index 00000000000..a20b2e023b4 --- /dev/null +++ b/mozilla/rdf/tests/makefile.win @@ -0,0 +1,38 @@ +#!gmake +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + + +DEPTH = ..\.. +MODULE=rdf + +MAKE_OBJ_TYPE = EXE + +EXENAME=rdftest +PDBFILE=rdftest.pdb +MAPFILE=rdftest.map + +PROGRAM=.\$(OBJDIR)\$(EXENAME).exe + +OBJS=.\$(OBJDIR)\rdftest.obj \ + $(NULL) + +LINCS= -I$(PUBLIC)\rdf -I$(LIBNSPR) -I$(XPDIST)\public\xpcom -I$(PUBLIC)\netlib -I$(PUBLIC)\raptor + +include <$(DEPTH)\config\rules.mak> + + + diff --git a/mozilla/rdf/tests/rdftest.cpp b/mozilla/rdf/tests/rdftest.cpp new file mode 100644 index 00000000000..dcf88e4af3e --- /dev/null +++ b/mozilla/rdf/tests/rdftest.cpp @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "rdf.h" + +int +main(int argc, char** argv) +{ + nsIRDFService* pRDF = 0; + + NS_RDFGetService( &pRDF ); + PR_ASSERT( pRDF != 0 ); + + nsIRDFDataBase* pDB; + char* url[] = { "rdf:sitemap.rdf", NULL }; + + /* turn on logging */ + + pRDF->CreateDatabase( url, &pDB ); + + /* execute queries */ + + pDB->Release(); + pRDF->Release(); + + return( 0 ); +} + diff --git a/mozilla/rdf/tests/sitemap.rdf b/mozilla/rdf/tests/sitemap.rdf new file mode 100644 index 00000000000..a8a0de3b43c --- /dev/null +++ b/mozilla/rdf/tests/sitemap.rdf @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +