/[suikacvs]/messaging/manakai/t/DOM-DOMImplementation.t
Suika

Contents of /messaging/manakai/t/DOM-DOMImplementation.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Thu Jun 14 13:10:07 2007 UTC (17 years, 5 months ago) by wakaba
Branch: MAIN
Changes since 1.1: +9 -1 lines
File MIME type: application/x-troff
++ manakai/t/ChangeLog	14 Jun 2007 13:09:37 -0000
2007-06-14  Wakaba  <wakaba@suika.fam.cx>

	* DOM-DOMImplementation.t: Tests for |create_document|
	and |create_document_type| are added.

++ manakai/lib/Message/DOM/ChangeLog	14 Jun 2007 13:09:13 -0000
2007-06-14  Wakaba  <wakaba@suika.fam.cx>

	* Notation.pm, Entity.pm, EntityReference.pm, ProcessingInstruction.pm,
	CDATASection.pm, DocumentFragment.pm, ElementTypeDefinition.pm,
	AttributeDefinition.pm: New modules.

	* DOMDocument.pm (@ISA): 'Message::IF::DocumentXDoctype' added.
	(create_attribute_definition, create_element_type_definition,
	create_document_type_definition, create_cdata_section,
	create_processing_instruction, create_entity_reference,
	create_general_entity, create_notation): Prototypes added.

	* DOMImplementation.pm (create_document_type): Prototype added.

	* DocumentType.pm (@ISA), 'Message::IF::DocumentTypeDefinition'
	and 'Message::IF::DocumentTypeDeclaration' added.
	(create_document_type, create_document_type_definition):
	New methods.

1 #!/usr/bin/perl
2 use strict;
3 use Test;
4 BEGIN { plan tests => 10 }
5
6 require Message::DOM::DOMImplementation;
7
8 my $dom = Message::DOM::DOMImplementation->____new;
9
10 ok $dom->isa ('Message::DOM::DOMImplementation');
11 ok $dom->isa ('Message::IF::DOMImplementation');
12
13 ## AUTOLOAD test
14 ok $dom->can ('create_uri_reference');
15 my $uri = $dom->create_uri_reference ('http://www.uri.test/');
16 ok UNIVERSAL::isa ($uri, 'Message::IF::URIReference');
17
18 ok $dom->can ('create_document');
19 my $doc = $dom->create_document;
20 ok UNIVERSAL::isa ($doc, 'Message::IF::Document');
21
22 ok $dom->can ('create_document_type');
23 my $doc = $dom->create_document_type;
24 ok UNIVERSAL::isa ($doc, 'Message::IF::DocumentType');
25
26 ok $dom->can ('no_such_method') ? 1 : 0, 0;
27 my $something_called = 0;
28 eval {
29 $dom->no_such_method;
30 $something_called = 1;
31 };
32 ok $something_called, 0;
33
34 ## License: Public Domain.
35 ## $Date: 2007/06/13 12:04:51 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24