Commit b0f75c88 authored by pintar's avatar pintar
Browse files

New tests for clause 7.6.1.2

parent 9121f99d
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 475
 ** @version  0.0.1
 ** @purpose  9:7.6.1.2, Verify restriction of a base type
 ** @verdict  pass reject
 ***************************************************/
module Neg_07060102_restricting_simple_content_001 {

    import from schema_Neg_07060102_restricting_simple_content_001 language "XSD" all;

    template E1 m_msg := {
      bar := 1,
      foo := 2.0,
      base := "someone" //error because of length 4
    }

//#TC_Neg
}
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="schema:Neg_07060102_restricting_simple_content_001"
    xmlns:ns="schema:Neg_07060102_restricting_simple_content_001">
	<complexType name="c1">
		<simpleContent>
			<extension base="string">
				<attribute name="foo" type="float"/>
				<attribute name="bar" type="integer"/>
			</extension>
		</simpleContent>
	</complexType>

	<complexType name="c2">
		<simpleContent>
			<restriction base="ns:c1">
				<length value="4"/>
			</restriction>
		</simpleContent>
	</complexType>

	<element name="e1" type="ns:c2"/>
</schema>
 No newline at end of file
+20 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 475
 ** @version  0.0.1
 ** @purpose  9:7.6.1.2, Verify restriction of a base type
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/
module Pos_07060102_restricting_simple_content_001 {

    import from schema_Pos_07060102_restricting_simple_content_001 language "XSD" all;

    /*template E1 m_msg := {
      bar := 1,
      foo := 2.0,
      base := "some"
    }*/
    
    template E1 m_msg := {bar := 1, foo := 2.0, base := "some"}

//#TC
}
+4 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<e1
  xmlns="schema:Pos_07060102_restricting_simple_content_001"
bar="1" foo="2.0">some</e1>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="schema:Pos_07060102_restricting_simple_content_001"
    xmlns:ns="schema:Pos_07060102_restricting_simple_content_001">
	<complexType name="c1">
		<simpleContent>
			<extension base="string">
				<attribute name="foo" type="float"/>
				<attribute name="bar" type="integer"/>
			</extension>
		</simpleContent>
	</complexType>

	<complexType name="c2">
		<simpleContent>
			<restriction base="ns:c1">
				<length value="4"/>
			</restriction>
		</simpleContent>
	</complexType>

	<element name="e1" type="ns:c2"/>
</schema>