From d697ba10a5fd3da26912c29116aff90c3be64640 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 10 Sep 2013 17:50:22 +0200 Subject: remove old unit tests Change-Id: I83619c47d435b9ee7bd0de3121832f84046a6d18 Reviewed-on: https://gerrit.libreoffice.org/5903 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- writerfilter/qa/cppunittests/qname/export.map | 25 - writerfilter/qa/cppunittests/qname/testQName.cxx | 7527 ---------------------- 2 files changed, 7552 deletions(-) delete mode 100644 writerfilter/qa/cppunittests/qname/export.map delete mode 100644 writerfilter/qa/cppunittests/qname/testQName.cxx (limited to 'writerfilter/qa') diff --git a/writerfilter/qa/cppunittests/qname/export.map b/writerfilter/qa/cppunittests/qname/export.map deleted file mode 100644 index 06b6a4a9286b..000000000000 --- a/writerfilter/qa/cppunittests/qname/export.map +++ /dev/null @@ -1,25 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . -# - -UDK_3_0_0 { - global: - registerAllTestFunction; - - local: - *; -}; diff --git a/writerfilter/qa/cppunittests/qname/testQName.cxx b/writerfilter/qa/cppunittests/qname/testQName.cxx deleted file mode 100644 index 4b8a94348425..000000000000 --- a/writerfilter/qa/cppunittests/qname/testQName.cxx +++ /dev/null @@ -1,7527 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#include -#include -#include -#include -#include -#include -#include -#include - - -using namespace writerfilter; - - -class TestQName : public CppUnit::TestFixture -{ -public: - void testAdd(const sal_Char* namespaceUri, const sal_Char *localName) - { - QName_t t=QName::tokenizer().insert(namespaceUri, localName); - const sal_Char *ln=QName::serializer().getLocalName(t); - const sal_Char *ns=QName::serializer().getNamespaceUri(t); - CPPUNIT_ASSERT(rtl_str_compare(localName, ln)==0); - CPPUNIT_ASSERT(rtl_str_compare(namespaceUri, ns)==0); - } - - void test() - { - rtlRandomPool rndPool=rtl_random_createPool(); - int numOfIterations=100000; //int numOfIterations=5000000; - for(int i=0;i context=QName::tokenizer().createQNameTokenizerContext(); - context->addBinding("xmlns:test", "http://sample.org/test1"); - CPPUNIT_ASSERT(rtl_str_compare(context->resolvePrefix("test"), "http://sample.org/test1")==0); - } - - void test_context2() - { - std::auto_ptr context=QName::tokenizer().createQNameTokenizerContext(); - context->addBinding("xmlns:test", "http://sample.org/test1"); - context->enterScope(); - CPPUNIT_ASSERT(rtl_str_compare(context->resolvePrefix("test"), "http://sample.org/test1")==0); - context->leaveScope(); - CPPUNIT_ASSERT(rtl_str_compare(context->resolvePrefix("test"), "http://sample.org/test1")==0); - } - - void test_context3() - { - std::auto_ptr context=QName::tokenizer().createQNameTokenizerContext(); - context->addBinding("xmlns:test", "http://sample.org/test1"); - context->enterScope(); - context->addBinding("xmlns:test", "http://sample.org/test2"); - CPPUNIT_ASSERT(rtl_str_compare(context->resolvePrefix("test"), "http://sample.org/test2")==0); - context->leaveScope(); - CPPUNIT_ASSERT(rtl_str_compare(context->resolvePrefix("test"), "http://sample.org/test1")==0); - } - - void test_resolver1() - { - QName_t qn; - std::auto_ptr context=QName::tokenizer().createQNameTokenizerContext(); - context->addBinding("xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0"); - CPPUNIT_ASSERT(QName::tokenizer().insert("text:span", *context, &qn)); - CPPUNIT_ASSERT(qn== NS_text::LN_span); - } - - void test_serializer1() - { - std::auto_ptr context=QName::tokenizer().createQNameSerializerContext(); - { - context->addPrefix("text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0"); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:text:1.0"), "text")==0); - } - } - - void test_serializer2() - { - std::auto_ptr context=QName::tokenizer().createQNameSerializerContext(); - { - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://sample.org/test1"), "_p0")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://sample.org/test2"), "_p1")==0); - } - } - - - void test_prefix() - { - std::auto_ptr context=QName::tokenizer().createQNameSerializerContext(); - CPPUNIT_ASSERT(context->getPrefix("")==QName::EMPTY_STRING); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:animation:1.0"), "anium")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://www.w3.org/1998/Math/MathML"), "math")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:office:word"), "w10")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:chart:1.0"), "chart")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/singlecells"), "sc12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:office:odc"), "odc12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:office:component:spreadsheet"), "c11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://relaxng.org/ns/structure/1.0"), "rng")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:meta:1.0"), "meta")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/data/udc/soap"), "udcs")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://www.w3.org/1999/xlink"), "xlink")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:style:1.0"), "style")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"), "fo")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://www.w3.org/2002/xforms"), "xforms")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"), "draw")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/project"), "prj12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/package/2005/06/metadata/core-properties"), "mdc12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:table:1.0"), "table")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:rowset"), "rs11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/sxref"), "sxr12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/officeart/2005/8/xldr"), "xldr12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/omml/2004/12/core"), "m12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"), "number")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/package/2005/06/content-types"), "p12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/voldeps"), "voldeps12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/pivot"), "pt12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://www.w3.org/XML/1998/namespace"), "xml")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/word/2003/wordml"), "w11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/schemaLibrary/2003/core"), "sl12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/styles"), "s12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/data/udc"), "udc")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"), "dr3d")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://www.w3.org/1999/02/22-rdf-syntax-ns#"), "rdf")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/supbook"), "sb12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/workbook"), "wb12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("#RowsetSchema"), "RowsetSchema")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/externalconnection"), "ec12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/querytable"), "qt12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:office:office"), "o12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"), "s11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:office:excel"), "x11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:office:spreadsheet"), "ss11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:rtf:1.7"), "rtf")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"), "smil")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/word/2005/8/25/wordml"), "w12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:rtf:schema"), "rtfs")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2003/xml"), "x2")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"), "ip12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/package/2005/06/relationships"), "rel12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:config:1.0"), "config")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:text:1.0"), "text")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/table"), "tbl12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"), "pr")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/data/udc/xmlfile"), "udcxf11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:office:1.0"), "office")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/metadata"), "md12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/powerpoint/2005/8/pml"), "pp12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/visio/2003/core"), "v11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/sst"), "sst12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/sharedworkbook"), "swb12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/officeart/2005/8/picture"), "pic12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:schemas-microsoft-com:vml"), "vml")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/activeX/2005/ax"), "ax12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/worksheet"), "ws12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/officeart/2005/8/wddr"), "wddr12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/officeart/2005/8/oartml"), "a12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"), "svg")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/onenote/2004/import"), "on12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:form:1.0"), "form")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("urn:oasis:names:tc:opendocument:xmlns:script:1.0"), "script")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/aml/2001/core"), "aml12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://purl.org/dc/elements/1.1/"), "dc")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/word/2003/auxHint"), "wa11")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/excel/2005/8/sharedworkbookusers"), "swbu12")==0); - CPPUNIT_ASSERT(rtl_str_compare(context->getPrefix("http://schemas.microsoft.com/office/2004/7/core"), "c12")==0); - } - - - CPPUNIT_TEST_SUITE(TestQName); - CPPUNIT_TEST(test); -// CPPUNIT_TEST(testperf); - CPPUNIT_TEST(testinsert); -// CPPUNIT_TEST(testdos); -// CPPUNIT_TEST(testperf); - - CPPUNIT_TEST(test_anium); - CPPUNIT_TEST(test_math); - CPPUNIT_TEST(test_w10); - CPPUNIT_TEST(test_chart); - CPPUNIT_TEST(test_sc12); - CPPUNIT_TEST(test_odc12); - CPPUNIT_TEST(test_c11); - CPPUNIT_TEST(test_rng); - CPPUNIT_TEST(test_meta); - CPPUNIT_TEST(test_udcs); - CPPUNIT_TEST(test_xlink); - CPPUNIT_TEST(test_style); - CPPUNIT_TEST(test_fo); - CPPUNIT_TEST(test_xforms); - CPPUNIT_TEST(test_draw); - CPPUNIT_TEST(test_prj12); - CPPUNIT_TEST(test_mdc12); - CPPUNIT_TEST(test_table); - CPPUNIT_TEST(test_rs11); - CPPUNIT_TEST(test_sxr12); - CPPUNIT_TEST(test_xldr12); - CPPUNIT_TEST(test_m12); - CPPUNIT_TEST(test_number); - CPPUNIT_TEST(test_p12); - CPPUNIT_TEST(test_voldeps12); - CPPUNIT_TEST(test_pt12); - CPPUNIT_TEST(test_xml); - CPPUNIT_TEST(test_w11); - CPPUNIT_TEST(test_sl12); - CPPUNIT_TEST(test_s12); - CPPUNIT_TEST(test_udc); - CPPUNIT_TEST(test_dr3d); - CPPUNIT_TEST(test_rdf); - CPPUNIT_TEST(test_sb12); - CPPUNIT_TEST(test_wb12); - CPPUNIT_TEST(test_RowsetSchema); - CPPUNIT_TEST(test_ec12); - CPPUNIT_TEST(test_qt12); - CPPUNIT_TEST(test_o12); - CPPUNIT_TEST(test_s11); - CPPUNIT_TEST(test_x11); - CPPUNIT_TEST(test_ss11); - CPPUNIT_TEST(test_rtf); - CPPUNIT_TEST(test_smil); - CPPUNIT_TEST(test_w12); - CPPUNIT_TEST(test_rtfs); - CPPUNIT_TEST(test_x2); - CPPUNIT_TEST(test_ip12); - CPPUNIT_TEST(test_rel12); - CPPUNIT_TEST(test_NONE); - CPPUNIT_TEST(test_config); - CPPUNIT_TEST(test_text); - CPPUNIT_TEST(test_tbl12); - CPPUNIT_TEST(test_pr); - CPPUNIT_TEST(test_udcxf11); - CPPUNIT_TEST(test_office); - CPPUNIT_TEST(test_md12); - CPPUNIT_TEST(test_pp12); - CPPUNIT_TEST(test_v11); - CPPUNIT_TEST(test_sst12); - CPPUNIT_TEST(test_swb12); - CPPUNIT_TEST(test_pic12); - CPPUNIT_TEST(test_vml); - CPPUNIT_TEST(test_ax12); - CPPUNIT_TEST(test_ws12); - CPPUNIT_TEST(test_wddr12); - CPPUNIT_TEST(test_a12); - CPPUNIT_TEST(test_svg); - CPPUNIT_TEST(test_on12); - CPPUNIT_TEST(test_form); - CPPUNIT_TEST(test_script); - CPPUNIT_TEST(test_aml12); - CPPUNIT_TEST(test_dc); - CPPUNIT_TEST(test_wa11); - CPPUNIT_TEST(test_swbu12); - CPPUNIT_TEST(test_c12); - - CPPUNIT_TEST(test_context1); - CPPUNIT_TEST(test_context2); - CPPUNIT_TEST(test_context3); - - CPPUNIT_TEST(test_resolver1); - - CPPUNIT_TEST(test_serializer1); - CPPUNIT_TEST(test_serializer2); - - CPPUNIT_TEST(test_prefix); - - CPPUNIT_TEST_SUITE_END(); -}; - -//##################################### -// register test suites -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(TestQName, "TestQName"); - -NOADDITIONAL; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit