"{ Package: 'stx:goodies/xmlsuite/xquery' }"
"{ NameSpace: XQuery }"
XQTSTestCase subclass:#XQTSSeqExprCastTests
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'XQuery-Tests-XQTS'
!
!XQTSSeqExprCastTests methodsFor:'tests'!
test_CastAs001
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs001:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(INF) to xs:untypedAtomic:)
(:*******************************************************:)
xs:untypedAtomic("INF") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs001.txt')
!
test_CastAs002
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs002:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(0.0E0) to xs:untypedAtomic:)
(:*******************************************************:)
xs:untypedAtomic("0.0E0") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs002.txt')
!
test_CastAs003
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs003:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:untypedAtomic:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs003.txt')
!
test_CastAs004
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs004:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(INF) to xs:string:)
(:*******************************************************:)
xs:untypedAtomic("INF") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs004.txt')
!
test_CastAs005
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs005:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(0.0E0) to xs:string:)
(:*******************************************************:)
xs:untypedAtomic("0.0E0") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs005.txt')
!
test_CastAs006
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs006:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:string:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs006.txt')
!
test_CastAs007
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs007:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:50-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0.0E0) to xs:float:)
(:*******************************************************:)
xs:untypedAtomic("-0.0E0") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs007.txt')
!
test_CastAs008
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs008:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(NaN) to xs:float:)
(:*******************************************************:)
xs:untypedAtomic("NaN") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs008.txt')
!
test_CastAs009
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs009:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1e-5) to xs:float:)
(:*******************************************************:)
xs:untypedAtomic("1e-5") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs009.txt')
!
test_CastAs010
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs010:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-10000000) to xs:float:)
(:*******************************************************:)
xs:untypedAtomic("-10000000") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs010.txt')
!
test_CastAs011
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs011:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:float:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs012
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs012:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0.0E0) to xs:double:)
(:*******************************************************:)
xs:untypedAtomic("-0.0E0") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs012.txt')
!
test_CastAs013
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs013:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(NaN) to xs:double:)
(:*******************************************************:)
xs:untypedAtomic("NaN") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs013.txt')
!
test_CastAs014
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs014:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1e-5) to xs:double:)
(:*******************************************************:)
xs:untypedAtomic("1e-5") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs014.txt')
!
test_CastAs015
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs015:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-10000000) to xs:double:)
(:*******************************************************:)
xs:untypedAtomic("-10000000") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs015.txt')
!
test_CastAs016
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs016:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:double:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs017
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs017:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0.0E0) to xs:decimal:)
(:*******************************************************:)
xs:untypedAtomic("-0.0E0") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs018
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs018:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(NaN) to xs:decimal:)
(:*******************************************************:)
xs:untypedAtomic("NaN") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs019
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs019:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1e-5) to xs:decimal:)
(:*******************************************************:)
xs:untypedAtomic("1e-5") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs020
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs020:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(5.5432) to xs:decimal:)
(:*******************************************************:)
xs:untypedAtomic("5.5432") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs020.txt')
!
test_CastAs021
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs021:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:decimal:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs022
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs022:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0.0E0) to xs:integer:)
(:*******************************************************:)
xs:untypedAtomic("-0.0E0") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs023
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs023:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(NaN) to xs:integer:)
(:*******************************************************:)
xs:untypedAtomic("NaN") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs024
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs024:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1e-5) to xs:integer:)
(:*******************************************************:)
xs:untypedAtomic("1e-5") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs025
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs025:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-1.1234) to xs:integer:)
(:*******************************************************:)
xs:untypedAtomic("-1.1234") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs026
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs026:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:integer:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs027
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs027:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(P1Y2M3DT10H30M23S) to xs:duration:)
(:*******************************************************:)
xs:untypedAtomic("P1Y2M3DT10H30M23S") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs027.txt')
!
test_CastAs028
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs028:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-P1Y1M1DT1H1M1.123S) to xs:duration:)
(:*******************************************************:)
xs:untypedAtomic("-P1Y1M1DT1H1M1.123S") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs028.txt')
!
test_CastAs029
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs029:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:duration:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs030
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs030:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-P1Y1M1DT1H1M1.123S) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:untypedAtomic("-P1Y1M1DT1H1M1.123S") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs031
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs031:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(P24M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:untypedAtomic("P24M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs031.txt')
!
test_CastAs032
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs032:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-P21M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:untypedAtomic("-P21M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs032.txt')
!
test_CastAs033
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs033:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs034
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs034:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-P1Y1M1DT1H1M1.123S) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:untypedAtomic("-P1Y1M1DT1H1M1.123S") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs035
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs035:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(P3DT10H30M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:untypedAtomic("P3DT10H30M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs035.txt')
!
test_CastAs036
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs036:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-PT100M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:untypedAtomic("-PT100M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs036.txt')
!
test_CastAs037
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs037:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs038
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs038:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999-05-31T13:20:00) to xs:dateTime:)
(:*******************************************************:)
xs:untypedAtomic("1999-05-31T13:20:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs038.txt')
!
test_CastAs039
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs039:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-1999-05-31T13:20:00+14:00) to xs:dateTime:)
(:*******************************************************:)
xs:untypedAtomic("-1999-05-31T13:20:00+14:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs039.txt')
!
test_CastAs040
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs040:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(2000-01-16T00:00:00Z) to xs:dateTime:)
(:*******************************************************:)
xs:untypedAtomic("2000-01-16T00:00:00Z") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs040.txt')
!
test_CastAs041
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs041:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:dateTime:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs042
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs042:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(13:20:00-05:00) to xs:time:)
(:*******************************************************:)
xs:untypedAtomic("13:20:00-05:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs042.txt')
!
test_CastAs043
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs043:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(13:20:02.123) to xs:time:)
(:*******************************************************:)
xs:untypedAtomic("13:20:02.123") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs043.txt')
!
test_CastAs044
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs044:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(13:20:00Z) to xs:time:)
(:*******************************************************:)
xs:untypedAtomic("13:20:00Z") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs044.txt')
!
test_CastAs045
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs045:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:time:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs046
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs046:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999-05-31) to xs:date:)
(:*******************************************************:)
xs:untypedAtomic("1999-05-31") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs046.txt')
!
test_CastAs047
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs047:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0012-12-03-05:00) to xs:date:)
(:*******************************************************:)
xs:untypedAtomic("-0012-12-03-05:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs047.txt')
!
test_CastAs048
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs048:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999-05-31Z) to xs:date:)
(:*******************************************************:)
xs:untypedAtomic("1999-05-31Z") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs048.txt')
!
test_CastAs049
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs049:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:date:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs050
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs050:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999-05) to xs:gYearMonth:)
(:*******************************************************:)
xs:untypedAtomic("1999-05") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs050.txt')
!
test_CastAs051
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs051:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0012-12-05:00) to xs:gYearMonth:)
(:*******************************************************:)
xs:untypedAtomic("-0012-12-05:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs051.txt')
!
test_CastAs052
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs052:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999-05Z) to xs:gYearMonth:)
(:*******************************************************:)
xs:untypedAtomic("1999-05Z") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs052.txt')
!
test_CastAs053
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs053:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:gYearMonth:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs054
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs054:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999) to xs:gYear:)
(:*******************************************************:)
xs:untypedAtomic("1999") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs054.txt')
!
test_CastAs055
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs055:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0012-05:00) to xs:gYear:)
(:*******************************************************:)
xs:untypedAtomic("-0012-05:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs055.txt')
!
test_CastAs056
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs056:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(1999Z) to xs:gYear:)
(:*******************************************************:)
xs:untypedAtomic("1999Z") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs056.txt')
!
test_CastAs057
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs057:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:gYear:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs058
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs058:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(--05-31) to xs:gMonthDay:)
(:*******************************************************:)
xs:untypedAtomic("--05-31") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs058.txt')
!
test_CastAs059
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs059:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(--05-31+14:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:untypedAtomic("--05-31+14:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs059.txt')
!
test_CastAs060
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs060:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(--05-31Z) to xs:gMonthDay:)
(:*******************************************************:)
xs:untypedAtomic("--05-31Z") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs060.txt')
!
test_CastAs061
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs061:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:gMonthDay:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs062
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs062:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(---31) to xs:gDay:)
(:*******************************************************:)
xs:untypedAtomic("---31") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs062.txt')
!
test_CastAs063
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs063:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(---03-05:00) to xs:gDay:)
(:*******************************************************:)
xs:untypedAtomic("---03-05:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs063.txt')
!
test_CastAs064
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs064:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(---31Z) to xs:gDay:)
(:*******************************************************:)
xs:untypedAtomic("---31Z") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs064.txt')
!
test_CastAs065
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs065:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:gDay:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs066
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs066:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(--05) to xs:gMonth:)
(:*******************************************************:)
xs:untypedAtomic("--05") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs066.txt')
!
test_CastAs067
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs067:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(--12-05:00) to xs:gMonth:)
(:*******************************************************:)
xs:untypedAtomic("--12-05:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs067.txt')
!
test_CastAs068
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs068:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(--05Z) to xs:gMonth:)
(:*******************************************************:)
xs:untypedAtomic("--05Z") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs068.txt')
!
test_CastAs069
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs069:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:gMonth:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs070
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs070:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(0.0) to xs:boolean:)
(:*******************************************************:)
xs:untypedAtomic("0.0") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs071
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs071:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(0) to xs:boolean:)
(:*******************************************************:)
xs:untypedAtomic("0") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs071.txt')
!
test_CastAs072
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs072:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:boolean:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs072.txt')
!
test_CastAs073
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs073:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:base64Binary:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs073.txt')
!
test_CastAs074
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs074:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:51-07:00:)
(:Purpose:Try casting xs:untypedAtomic(00000000) to xs:base64Binary:)
(:*******************************************************:)
xs:untypedAtomic("00000000") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs074.txt')
!
test_CastAs075
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs075:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(D74D35D35D35) to xs:base64Binary:)
(:*******************************************************:)
xs:untypedAtomic("D74D35D35D35") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs075.txt')
!
test_CastAs076
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs076:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:hexBinary:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs077
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs077:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(010010101) to xs:hexBinary:)
(:*******************************************************:)
xs:untypedAtomic("010010101") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs078
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs078:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(0fb7) to xs:hexBinary:)
(:*******************************************************:)
xs:untypedAtomic("0fb7") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs078.txt')
!
test_CastAs079
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs079:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(D74D35D35D35) to xs:hexBinary:)
(:*******************************************************:)
xs:untypedAtomic("D74D35D35D35") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs079.txt')
!
test_CastAs080
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs080:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(-0012-05:00) to xs:anyURI:)
(:*******************************************************:)
xs:untypedAtomic("http://www.example.com/~b%C3%A9b%C3%A9") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs080.txt')
!
test_CastAs081
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs081:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(true) to xs:anyURI:)
(:*******************************************************:)
xs:untypedAtomic("true") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs081.txt')
!
test_CastAs082
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs082:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:untypedAtomic(http://www.ietf.org/rfc/rfc2396.txt) to xs:anyURI:)
(:*******************************************************:)
xs:untypedAtomic("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs082.txt')
!
test_CastAs083
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs083:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(INF) to xs:untypedAtomic:)
(:*******************************************************:)
xs:string("INF") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs083.txt')
!
test_CastAs084
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs084:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(0.0E0) to xs:untypedAtomic:)
(:*******************************************************:)
xs:string("0.0E0") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs084.txt')
!
test_CastAs085
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs085:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:untypedAtomic:)
(:*******************************************************:)
xs:string("true") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs085.txt')
!
test_CastAs086
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs086:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(INF) to xs:string:)
(:*******************************************************:)
xs:string("INF") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs086.txt')
!
test_CastAs087
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs087:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(0.0E0) to xs:string:)
(:*******************************************************:)
xs:string("0.0E0") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs087.txt')
!
test_CastAs088
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs088:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:string:)
(:*******************************************************:)
xs:string("true") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs088.txt')
!
test_CastAs089
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs089:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-0.0E0) to xs:float:)
(:*******************************************************:)
xs:string("-0.0E0") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs089.txt')
!
test_CastAs090
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs090:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(NaN) to xs:float:)
(:*******************************************************:)
xs:string("NaN") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs090.txt')
!
test_CastAs091
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs091:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1e-5) to xs:float:)
(:*******************************************************:)
xs:string("1e-5") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs091.txt')
!
test_CastAs092
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs092:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-10000000) to xs:float:)
(:*******************************************************:)
xs:string("-10000000") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs092.txt')
!
test_CastAs093
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs093:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:float:)
(:*******************************************************:)
xs:string("true") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs094
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs094:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-0.0E0) to xs:double:)
(:*******************************************************:)
xs:string("-0.0E0") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs094.txt')
!
test_CastAs095
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs095:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(NaN) to xs:double:)
(:*******************************************************:)
xs:string("NaN") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs095.txt')
!
test_CastAs096
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs096:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1e-5) to xs:double:)
(:*******************************************************:)
xs:string("1e-5") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs096.txt')
!
test_CastAs097
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs097:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-10000000) to xs:double:)
(:*******************************************************:)
xs:string("-10000000") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs097.txt')
!
test_CastAs098
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs098:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:double:)
(:*******************************************************:)
xs:string("true") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs099
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs099:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-0.0E0) to xs:decimal:)
(:*******************************************************:)
xs:string("-0.0E0") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs100
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs100:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(NaN) to xs:decimal:)
(:*******************************************************:)
xs:string("NaN") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs101
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs101:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1e-5) to xs:decimal:)
(:*******************************************************:)
xs:string("1e-5") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs102
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs102:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(5.5432) to xs:decimal:)
(:*******************************************************:)
xs:string("5.5432") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs102.txt')
!
test_CastAs103
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs103:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:decimal:)
(:*******************************************************:)
xs:string("true") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs104
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs104:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-0.0E0) to xs:integer:)
(:*******************************************************:)
xs:string("-0.0E0") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs105
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs105:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(NaN) to xs:integer:)
(:*******************************************************:)
xs:string("NaN") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs106
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs106:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1e-5) to xs:integer:)
(:*******************************************************:)
xs:string("1e-5") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs107
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs107:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-1.1234) to xs:integer:)
(:*******************************************************:)
xs:string("-1.1234") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs108
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs108:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:integer:)
(:*******************************************************:)
xs:string("true") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs109
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs109:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(P1Y2M3DT10H30M23S) to xs:duration:)
(:*******************************************************:)
xs:string("P1Y2M3DT10H30M23S") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs109.txt')
!
test_CastAs110
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs110:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-P1Y1M1DT1H1M1.123S) to xs:duration:)
(:*******************************************************:)
xs:string("-P1Y1M1DT1H1M1.123S") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs110.txt')
!
test_CastAs111
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs111:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:duration:)
(:*******************************************************:)
xs:string("true") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs112
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs112:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-P1Y1M1DT1H1M1.123S) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:string("-P1Y1M1DT1H1M1.123S") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs113
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs113:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(P24M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:string("P24M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs113.txt')
!
test_CastAs114
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs114:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-P21M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:string("-P21M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs114.txt')
!
test_CastAs115
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs115:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:string("true") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs116
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs116:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-P1Y1M1DT1H1M1.123S) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:string("-P1Y1M1DT1H1M1.123S") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs117
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs117:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(P3DT10H30M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:string("P3DT10H30M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs117.txt')
!
test_CastAs118
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs118:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-PT100M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:string("-PT100M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs118.txt')
!
test_CastAs119
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs119:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:string("true") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs120
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs120:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1999-05-31T13:20:00) to xs:dateTime:)
(:*******************************************************:)
xs:string("1999-05-31T13:20:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs120.txt')
!
test_CastAs121
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs121:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-1999-05-31T13:20:00+14:00) to xs:dateTime:)
(:*******************************************************:)
xs:string("-1999-05-31T13:20:00+14:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs121.txt')
!
test_CastAs122
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs122:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(2000-01-16T00:00:00Z) to xs:dateTime:)
(:*******************************************************:)
xs:string("2000-01-16T00:00:00Z") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs122.txt')
!
test_CastAs123
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs123:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:dateTime:)
(:*******************************************************:)
xs:string("true") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs124
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs124:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(13:20:00-05:00) to xs:time:)
(:*******************************************************:)
xs:string("13:20:00-05:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs124.txt')
!
test_CastAs125
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs125:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(13:20:02.123) to xs:time:)
(:*******************************************************:)
xs:string("13:20:02.123") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs125.txt')
!
test_CastAs126
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs126:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(13:20:00Z) to xs:time:)
(:*******************************************************:)
xs:string("13:20:00Z") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs126.txt')
!
test_CastAs127
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs127:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:time:)
(:*******************************************************:)
xs:string("true") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs128
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs128:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1999-05-31) to xs:date:)
(:*******************************************************:)
xs:string("1999-05-31") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs128.txt')
!
test_CastAs129
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs129:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-0012-12-03-05:00) to xs:date:)
(:*******************************************************:)
xs:string("-0012-12-03-05:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs129.txt')
!
test_CastAs130
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs130:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1999-05-31Z) to xs:date:)
(:*******************************************************:)
xs:string("1999-05-31Z") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs130.txt')
!
test_CastAs131
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs131:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(true) to xs:date:)
(:*******************************************************:)
xs:string("true") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs132
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs132:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1999-05) to xs:gYearMonth:)
(:*******************************************************:)
xs:string("1999-05") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs132.txt')
!
test_CastAs133
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs133:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(-0012-12-05:00) to xs:gYearMonth:)
(:*******************************************************:)
xs:string("-0012-12-05:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs133.txt')
!
test_CastAs134
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs134:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:52-07:00:)
(:Purpose:Try casting xs:string(1999-05Z) to xs:gYearMonth:)
(:*******************************************************:)
xs:string("1999-05Z") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs134.txt')
!
test_CastAs135
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs135:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:gYearMonth:)
(:*******************************************************:)
xs:string("true") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs136
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs136:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(1999) to xs:gYear:)
(:*******************************************************:)
xs:string("1999") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs136.txt')
!
test_CastAs137
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs137:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(-0012-05:00) to xs:gYear:)
(:*******************************************************:)
xs:string("-0012-05:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs137.txt')
!
test_CastAs138
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs138:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(1999Z) to xs:gYear:)
(:*******************************************************:)
xs:string("1999Z") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs138.txt')
!
test_CastAs139
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs139:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:gYear:)
(:*******************************************************:)
xs:string("true") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs140
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs140:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(--05-31) to xs:gMonthDay:)
(:*******************************************************:)
xs:string("--05-31") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs140.txt')
!
test_CastAs141
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs141:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(--05-31+14:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:string("--05-31+14:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs141.txt')
!
test_CastAs142
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs142:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(--05-31Z) to xs:gMonthDay:)
(:*******************************************************:)
xs:string("--05-31Z") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs142.txt')
!
test_CastAs143
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs143:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:gMonthDay:)
(:*******************************************************:)
xs:string("true") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs144
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs144:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(---31) to xs:gDay:)
(:*******************************************************:)
xs:string("---31") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs144.txt')
!
test_CastAs145
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs145:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(---03-05:00) to xs:gDay:)
(:*******************************************************:)
xs:string("---03-05:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs145.txt')
!
test_CastAs146
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs146:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(---31Z) to xs:gDay:)
(:*******************************************************:)
xs:string("---31Z") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs146.txt')
!
test_CastAs147
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs147:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:gDay:)
(:*******************************************************:)
xs:string("true") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs148
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs148:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(--05) to xs:gMonth:)
(:*******************************************************:)
xs:string("--05") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs148.txt')
!
test_CastAs149
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs149:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(--12-05:00) to xs:gMonth:)
(:*******************************************************:)
xs:string("--12-05:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs149.txt')
!
test_CastAs150
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs150:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(--05Z) to xs:gMonth:)
(:*******************************************************:)
xs:string("--05Z") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs150.txt')
!
test_CastAs151
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs151:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:gMonth:)
(:*******************************************************:)
xs:string("true") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs152
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs152:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(0.0) to xs:boolean:)
(:*******************************************************:)
xs:string("0.0") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs153
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs153:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(0) to xs:boolean:)
(:*******************************************************:)
xs:string("0") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs153.txt')
!
test_CastAs154
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs154:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:boolean:)
(:*******************************************************:)
xs:string("true") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs154.txt')
!
test_CastAs155
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs155:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:base64Binary:)
(:*******************************************************:)
xs:string("true") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs155.txt')
!
test_CastAs156
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs156:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(00000000) to xs:base64Binary:)
(:*******************************************************:)
xs:string("00000000") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs156.txt')
!
test_CastAs157
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs157:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(D74D35D35D35) to xs:base64Binary:)
(:*******************************************************:)
xs:string("D74D35D35D35") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs157.txt')
!
test_CastAs158
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs158:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:hexBinary:)
(:*******************************************************:)
xs:string("true") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs159
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs159:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(010010101) to xs:hexBinary:)
(:*******************************************************:)
xs:string("010010101") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs160
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs160:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(0fb7) to xs:hexBinary:)
(:*******************************************************:)
xs:string("0fb7") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs160.txt')
!
test_CastAs161
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs161:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(D74D35D35D35) to xs:hexBinary:)
(:*******************************************************:)
xs:string("D74D35D35D35") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs161.txt')
!
test_CastAs162
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs162:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(-0012-05:00) to xs:anyURI:)
(:*******************************************************:)
xs:string("http://www.example.com/~b%C3%A9b%C3%A9") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs162.txt')
!
test_CastAs163
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs163:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(true) to xs:anyURI:)
(:*******************************************************:)
xs:string("true") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs163.txt')
!
test_CastAs164
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs164:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:string(http://www.ietf.org/rfc/rfc2396.txt) to xs:anyURI:)
(:*******************************************************:)
xs:string("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs164.txt')
!
test_CastAs165
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs165:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(1e5) to xs:untypedAtomic:)
(:*******************************************************:)
xs:float("1e5") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs165.txt')
!
test_CastAs166
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs166:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-INF) to xs:untypedAtomic:)
(:*******************************************************:)
xs:float("-INF") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs166.txt')
!
test_CastAs167
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs167:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-0.0E0) to xs:string:)
(:*******************************************************:)
xs:float("-0.0E0") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs167.txt')
!
test_CastAs168
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs168:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(NaN) to xs:string:)
(:*******************************************************:)
xs:float("NaN") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs168.txt')
!
test_CastAs169
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs169:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:float:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs169.txt')
!
test_CastAs170
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs170:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-1.75e-3) to xs:float:)
(:*******************************************************:)
xs:float("-1.75e-3") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs170.txt')
!
test_CastAs171
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs171:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(INF) to xs:float:)
(:*******************************************************:)
xs:float("INF") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs171.txt')
!
test_CastAs172
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs172:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-0.0E0) to xs:double:)
(:*******************************************************:)
xs:float("-0.0E0") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs172.txt')
!
test_CastAs173
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs173:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-INF) to xs:double:)
(:*******************************************************:)
xs:float("-INF") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs173.txt')
!
test_CastAs174
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs174:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-0.0E0) to xs:decimal:)
(:*******************************************************:)
xs:float("-0.0E0") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs174.txt')
!
test_CastAs175
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs175:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:decimal:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs175.txt')
!
test_CastAs176
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs176:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(1e5) to xs:decimal:)
(:*******************************************************:)
xs:float("1e5") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs176.txt')
!
test_CastAs177
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs177:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-1.75e-3) to xs:decimal:)
(:*******************************************************:)
round-half-to-even(xs:float("-1.75e-3") cast as xs:decimal,5)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs177.txt')
!
test_CastAs178
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs178:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-0.0E0) to xs:integer:)
(:*******************************************************:)
xs:float("-0.0E0") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs178.txt')
!
test_CastAs179
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs179:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(1e5) to xs:integer:)
(:*******************************************************:)
xs:float("1e5") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs179.txt')
!
test_CastAs180
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs180:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(INF) to xs:integer:)
(:*******************************************************:)
xs:float("INF") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs181
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs181:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-1.75e-3) to xs:duration:)
(:*******************************************************:)
xs:float("-1.75e-3") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs182
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs182:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs183
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs183:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs184
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs184:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:dateTime:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs185
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs185:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:time:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs186
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs186:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:date:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs187
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs187:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:gYearMonth:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs188
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs188:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:gYear:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs189
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs189:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:gMonthDay:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs190
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs190:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:gDay:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs191
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs191:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:gMonth:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs192
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs192:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-0.0E0) to xs:boolean:)
(:*******************************************************:)
xs:float("-0.0E0") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs192.txt')
!
test_CastAs193
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs193:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(1e5) to xs:boolean:)
(:*******************************************************:)
xs:float("1e5") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs193.txt')
!
test_CastAs194
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs194:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(-INF) to xs:boolean:)
(:*******************************************************:)
xs:float("-INF") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs194.txt')
!
test_CastAs195
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs195:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(NaN) to xs:boolean:)
(:*******************************************************:)
xs:float("NaN") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs195.txt')
!
test_CastAs196
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs196:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:base64Binary:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs197
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs197:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:hexBinary:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs198
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs198:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:float(5.4321E-100) to xs:anyURI:)
(:*******************************************************:)
xs:float("5.4321E-100") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs199
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs199:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:untypedAtomic:)
(:*******************************************************:)
xs:double("1e5") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs199.txt')
!
test_CastAs200
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs200:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(INF) to xs:untypedAtomic:)
(:*******************************************************:)
xs:double("INF") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs200.txt')
!
test_CastAs201
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs201:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(1e8) to xs:string:)
(:*******************************************************:)
xs:double("1e8") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs201.txt')
!
test_CastAs202
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs202:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(INF) to xs:string:)
(:*******************************************************:)
xs:double("INF") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs202.txt')
!
test_CastAs203
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs203:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(-0.0E0) to xs:float:)
(:*******************************************************:)
xs:double("-0.0E0") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs203.txt')
!
test_CastAs204
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs204:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(5.4321E-1001) to xs:float:)
(:*******************************************************:)
xs:double("5.4321E-1001") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs204.txt')
!
test_CastAs205
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs205:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:float:)
(:*******************************************************:)
xs:double("1e5") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs205.txt')
!
test_CastAs206
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs206:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(-1.75e-3) to xs:float:)
(:*******************************************************:)
xs:double("-1.75e-3") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs206.txt')
!
test_CastAs207
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs207:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(NaN) to xs:float:)
(:*******************************************************:)
xs:double("NaN") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs207.txt')
!
test_CastAs208
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs208:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:double:)
(:*******************************************************:)
xs:double("1e5") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs208.txt')
!
test_CastAs209
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs209:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(INF) to xs:double:)
(:*******************************************************:)
xs:double("INF") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs209.txt')
!
test_CastAs210
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs210:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(-0.0E0) to xs:decimal:)
(:*******************************************************:)
xs:double("-0.0E0") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs210.txt')
!
test_CastAs211
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs211:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(5.4321E-1001) to xs:decimal:)
(:*******************************************************:)
xs:double("5.4321E-1001") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs211.txt')
!
test_CastAs212
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs212:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(-1.75e-3) to xs:decimal:)
(:*******************************************************:)
round-half-to-even(xs:double("-1.75e-3") cast as xs:decimal,5)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs212.txt')
!
test_CastAs213
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs213:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(INF) to xs:decimal:)
(:*******************************************************:)
xs:double("INF") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs214
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs214:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(-0.0E0) to xs:integer:)
(:*******************************************************:)
xs:double("-0.0E0") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs214.txt')
!
test_CastAs215
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs215:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:integer:)
(:*******************************************************:)
xs:double("1e5") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs215.txt')
!
test_CastAs216
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs216:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(-1.75e-3) to xs:integer:)
(:*******************************************************:)
xs:double("-1.75e-3") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs216.txt')
!
test_CastAs217
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs217:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(INF) to xs:integer:)
(:*******************************************************:)
xs:double("INF") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs218
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs218:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:53-07:00:)
(:Purpose:Try casting xs:double(NaN) to xs:integer:)
(:*******************************************************:)
xs:double("NaN") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs219
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs219:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:duration:)
(:*******************************************************:)
xs:double("1e5") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs220
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs220:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:double("1e5") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs221
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs221:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:double("1e5") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs222
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs222:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:dateTime:)
(:*******************************************************:)
xs:double("1e5") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs223
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs223:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:time:)
(:*******************************************************:)
xs:double("1e5") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs224
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs224:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:date:)
(:*******************************************************:)
xs:double("1e5") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs225
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs225:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:gYearMonth:)
(:*******************************************************:)
xs:double("1e5") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs226
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs226:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:gYear:)
(:*******************************************************:)
xs:double("1e5") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs227
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs227:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:gMonthDay:)
(:*******************************************************:)
xs:double("1e5") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs228
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs228:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:gDay:)
(:*******************************************************:)
xs:double("1e5") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs229
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs229:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:gMonth:)
(:*******************************************************:)
xs:double("1e5") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs230
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs230:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:boolean:)
(:*******************************************************:)
xs:double("1e5") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs230.txt')
!
test_CastAs231
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs231:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:base64Binary:)
(:*******************************************************:)
xs:double("1e5") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs232
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs232:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:hexBinary:)
(:*******************************************************:)
xs:double("1e5") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs233
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs233:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:double(1e5) to xs:anyURI:)
(:*******************************************************:)
xs:double("1e5") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs234
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs234:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:untypedAtomic:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs234.txt')
!
test_CastAs235
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs235:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:string:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs235.txt')
!
test_CastAs236
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs236:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:float:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs236.txt')
!
test_CastAs237
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs237:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:double:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs237.txt')
!
test_CastAs238
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs238:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:decimal:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs238.txt')
!
test_CastAs239
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs239:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:integer:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs239.txt')
!
test_CastAs240
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs240:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(5.5432) to xs:integer:)
(:*******************************************************:)
xs:decimal("5.5432") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs240.txt')
!
test_CastAs241
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs241:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:duration:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs242
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs242:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs243
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs243:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs244
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs244:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:dateTime:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs245
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs245:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:time:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs246
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs246:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:date:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs247
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs247:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:gYearMonth:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs248
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs248:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:gYear:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs249
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs249:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:gMonthDay:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs250
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs250:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:gDay:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs251
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs251:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:gMonth:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs252
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs252:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:boolean:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs252.txt')
!
test_CastAs253
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs253:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:base64Binary:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs254
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs254:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:hexBinary:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs255
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs255:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:decimal(-1.1234) to xs:anyURI:)
(:*******************************************************:)
xs:decimal("-1.1234") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs256
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs256:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(1) to xs:untypedAtomic:)
(:*******************************************************:)
xs:integer("1") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs256.txt')
!
test_CastAs257
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs257:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:string:)
(:*******************************************************:)
xs:integer("-100") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs257.txt')
!
test_CastAs258
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs258:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:float:)
(:*******************************************************:)
xs:integer("-100") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs258.txt')
!
test_CastAs259
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs259:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:double:)
(:*******************************************************:)
xs:integer("-100") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs259.txt')
!
test_CastAs260
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs260:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:decimal:)
(:*******************************************************:)
xs:integer("-100") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs260.txt')
!
test_CastAs261
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs261:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:integer:)
(:*******************************************************:)
xs:integer("-100") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs261.txt')
!
test_CastAs262
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs262:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:duration:)
(:*******************************************************:)
xs:integer("-100") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs263
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs263:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:integer("-100") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs264
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs264:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:integer("-100") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs265
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs265:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:dateTime:)
(:*******************************************************:)
xs:integer("-100") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs266
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs266:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:time:)
(:*******************************************************:)
xs:integer("-100") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs267
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs267:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:date:)
(:*******************************************************:)
xs:integer("-100") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs268
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs268:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:gYearMonth:)
(:*******************************************************:)
xs:integer("-100") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs269
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs269:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:gYear:)
(:*******************************************************:)
xs:integer("-100") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs270
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs270:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:gMonthDay:)
(:*******************************************************:)
xs:integer("-100") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs271
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs271:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:gDay:)
(:*******************************************************:)
xs:integer("-100") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs272
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs272:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:gMonth:)
(:*******************************************************:)
xs:integer("-100") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs273
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs273:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:boolean:)
(:*******************************************************:)
xs:integer("-100") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs273.txt')
!
test_CastAs274
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs274:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:base64Binary:)
(:*******************************************************:)
xs:integer("-100") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs275
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs275:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:hexBinary:)
(:*******************************************************:)
xs:integer("-100") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs276
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs276:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:integer(-100) to xs:anyURI:)
(:*******************************************************:)
xs:integer("-100") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs277
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs277:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:untypedAtomic:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs277.txt')
!
test_CastAs278
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs278:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:string:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs278.txt')
!
test_CastAs279
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs279:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:float:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs280
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs280:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:double:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs281
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs281:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:decimal:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs282
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs282:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:integer:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs283
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs283:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:duration:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs283.txt')
!
test_CastAs284
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs284:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(PT10H) to xs:duration:)
(:*******************************************************:)
xs:duration("PT10H") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs284.txt')
!
test_CastAs285
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs285:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs285.txt')
!
test_CastAs286
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs286:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(PT10H) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:duration("PT10H") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs286.txt')
!
test_CastAs287
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs287:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P24M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:duration("P24M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs287.txt')
!
test_CastAs288
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs288:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs288.txt')
!
test_CastAs289
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs289:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(PT10H) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:duration("PT10H") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs289.txt')
!
test_CastAs290
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs290:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P24M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:duration("P24M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs290.txt')
!
test_CastAs291
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs291:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:dateTime:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs292
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs292:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:time:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs293
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs293:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:date:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs294
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs294:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:gYearMonth:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs295
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs295:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:gYear:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs296
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs296:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:gMonthDay:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs297
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs297:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:gDay:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs298
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs298:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:gMonth:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs299
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs299:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:boolean:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs300
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs300:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:base64Binary:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs301
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs301:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:hexBinary:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs302
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs302:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:duration(P1Y2M3DT10H30M23S) to xs:anyURI:)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M23S") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs303
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs303:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:untypedAtomic:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs303.txt')
!
test_CastAs304
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs304:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:string:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs304.txt')
!
test_CastAs305
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs305:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:float:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs306
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs306:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:double:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs307
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs307:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:decimal:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs308
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs308:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:integer:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs309
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs309:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:duration:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs309.txt')
!
test_CastAs310
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs310:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs310.txt')
!
test_CastAs311
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs311:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(-P21M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:yearMonthDuration("-P21M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs311.txt')
!
test_CastAs312
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs312:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs312.txt')
!
test_CastAs313
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs313:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:dateTime:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs314
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs314:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:time:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs315
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs315:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:date:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs316
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs316:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:gYearMonth:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs317
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs317:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:gYear:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs318
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs318:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:gMonthDay:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs319
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs319:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:gDay:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs320
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs320:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:gMonth:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs321
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs321:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:boolean:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs322
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs322:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:base64Binary:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs323
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs323:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:hexBinary:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs324
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs324:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:yearMonthDuration(P1Y2M) to xs:anyURI:)
(:*******************************************************:)
xs:yearMonthDuration("P1Y2M") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs325
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs325:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:untypedAtomic:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs325.txt')
!
test_CastAs326
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs326:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(-PT100M) to xs:untypedAtomic:)
(:*******************************************************:)
xs:dayTimeDuration("-PT100M") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs326.txt')
!
test_CastAs327
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs327:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:string:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs327.txt')
!
test_CastAs328
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs328:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(-PT100M) to xs:string:)
(:*******************************************************:)
xs:dayTimeDuration("-PT100M") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs328.txt')
!
test_CastAs329
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs329:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:float:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs330
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs330:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:54-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:double:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs331
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs331:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:decimal:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs332
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs332:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:integer:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs333
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs333:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:duration:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs333.txt')
!
test_CastAs334
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs334:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(PT24H) to xs:duration:)
(:*******************************************************:)
xs:dayTimeDuration("PT24H") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs334.txt')
!
test_CastAs335
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs335:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(-PT100M) to xs:duration:)
(:*******************************************************:)
xs:dayTimeDuration("-PT100M") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs335.txt')
!
test_CastAs336
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs336:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs336.txt')
!
test_CastAs337
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs337:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs337.txt')
!
test_CastAs338
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs338:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P14D) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:dayTimeDuration("P14D") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs338.txt')
!
test_CastAs339
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs339:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(-PT100M) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:dayTimeDuration("-PT100M") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs339.txt')
!
test_CastAs340
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs340:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:dateTime:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs341
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs341:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:time:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs342
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs342:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:date:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs343
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs343:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:gYearMonth:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs344
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs344:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:gYear:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs345
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs345:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:gMonthDay:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs346
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs346:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:gDay:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs347
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs347:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:gMonth:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs348
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs348:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:boolean:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs349
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs349:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:base64Binary:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs350
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs350:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:hexBinary:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs351
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs351:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dayTimeDuration(P3DT10H30M) to xs:anyURI:)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H30M") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs352
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs352:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:untypedAtomic:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs352.txt')
!
test_CastAs353
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs353:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:untypedAtomic:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs353.txt')
!
test_CastAs354
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs354:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:string:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs354.txt')
!
test_CastAs355
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs355:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:string:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs355.txt')
!
test_CastAs356
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs356:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:float:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs357
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs357:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(2000-01-16T00:00:00Z) to xs:float:)
(:*******************************************************:)
xs:dateTime("2000-01-16T00:00:00Z") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs358
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs358:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:decimal:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs359
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs359:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:integer:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs360
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs360:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:duration:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs361
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs361:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs362
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs362:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs363
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs363:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:dateTime:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs363.txt')
!
test_CastAs364
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs364:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:time:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs364.txt')
!
test_CastAs365
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs365:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:time:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs365.txt')
!
test_CastAs366
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs366:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:date:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs366.txt')
!
test_CastAs367
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs367:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:date:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs367.txt')
!
test_CastAs368
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs368:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:gYearMonth:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs368.txt')
!
test_CastAs369
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs369:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:gYearMonth:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs369.txt')
!
test_CastAs370
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs370:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:gYear:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs370.txt')
!
test_CastAs371
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs371:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:gYear:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs371.txt')
!
test_CastAs372
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs372:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs372.txt')
!
test_CastAs373
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs373:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs373.txt')
!
test_CastAs374
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs374:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:gDay:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs374.txt')
!
test_CastAs375
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs375:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:gDay:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs375.txt')
!
test_CastAs376
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs376:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:gMonth:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs376.txt')
!
test_CastAs377
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs377:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(-1999-05-31T13:20:00+14:00) to xs:gMonth:)
(:*******************************************************:)
xs:dateTime("-1999-05-31T13:20:00+14:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs377.txt')
!
test_CastAs378
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs378:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:boolean:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs379
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs379:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:base64Binary:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs380
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs380:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:hexBinary:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs381
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs381:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:dateTime(1999-05-31T13:20:00) to xs:anyURI:)
(:*******************************************************:)
xs:dateTime("1999-05-31T13:20:00") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs382
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs382:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:untypedAtomic:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs382.txt')
!
test_CastAs383
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs383:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:string:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs383.txt')
!
test_CastAs384
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs384:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:float:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs385
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs385:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:double:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs386
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs386:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:decimal:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs387
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs387:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:integer:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs388
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs388:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:duration:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs389
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs389:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs390
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs390:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs391
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs391:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:dateTime:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs392
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs392:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:time:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs392.txt')
!
test_CastAs393
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs393:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:02.123) to xs:time:)
(:*******************************************************:)
xs:time("13:20:02.123") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs393.txt')
!
test_CastAs394
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs394:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00Z) to xs:time:)
(:*******************************************************:)
xs:time("13:20:00Z") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs394.txt')
!
test_CastAs395
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs395:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:date:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs396
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs396:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:gYearMonth:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs397
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs397:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:gYear:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs398
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs398:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs399
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs399:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:gDay:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs400
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs400:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:gMonth:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs401
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs401:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:boolean:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs402
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs402:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:base64Binary:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs403
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs403:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:hexBinary:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs404
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs404:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:time(13:20:00-05:00) to xs:anyURI:)
(:*******************************************************:)
xs:time("13:20:00-05:00") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs405
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs405:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:untypedAtomic:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs405.txt')
!
test_CastAs406
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs406:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(-0012-12-03-05:00) to xs:untypedAtomic:)
(:*******************************************************:)
xs:date("-0012-12-03-05:00") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs406.txt')
!
test_CastAs407
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs407:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:string:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs407.txt')
!
test_CastAs408
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs408:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(-0012-12-03-05:00) to xs:string:)
(:*******************************************************:)
xs:date("-0012-12-03-05:00") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs408.txt')
!
test_CastAs409
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs409:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:float:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs410
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs410:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:double:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs411
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs411:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31Z) to xs:double:)
(:*******************************************************:)
xs:date("1999-05-31Z") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs412
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs412:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:integer:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs413
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs413:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:duration:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs414
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs414:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs415
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs415:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs416
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs416:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:dateTime:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs416.txt')
!
test_CastAs417
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs417:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:time:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs418
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs418:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:date:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs418.txt')
!
test_CastAs419
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs419:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(-0012-12-03-05:00) to xs:date:)
(:*******************************************************:)
xs:date("-0012-12-03-05:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs419.txt')
!
test_CastAs420
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs420:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31Z) to xs:date:)
(:*******************************************************:)
xs:date("1999-05-31Z") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs420.txt')
!
test_CastAs421
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs421:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:gYearMonth:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs421.txt')
!
test_CastAs422
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs422:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:gYear:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs422.txt')
!
test_CastAs423
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs423:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(-0012-12-03-05:00) to xs:gYear:)
(:*******************************************************:)
xs:date("-0012-12-03-05:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs423.txt')
!
test_CastAs424
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs424:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31Z) to xs:gYear:)
(:*******************************************************:)
xs:date("1999-05-31Z") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs424.txt')
!
test_CastAs425
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs425:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:gMonthDay:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs425.txt')
!
test_CastAs426
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs426:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(-0012-12-03-05:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:date("-0012-12-03-05:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs426.txt')
!
test_CastAs427
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs427:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31Z) to xs:gMonthDay:)
(:*******************************************************:)
xs:date("1999-05-31Z") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs427.txt')
!
test_CastAs428
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs428:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31Z) to xs:gDay:)
(:*******************************************************:)
xs:date("1999-05-31Z") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs428.txt')
!
test_CastAs429
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs429:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(-0012-12-03-05:00) to xs:gMonth:)
(:*******************************************************:)
xs:date("-0012-12-03-05:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs429.txt')
!
test_CastAs430
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs430:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31Z) to xs:gMonth:)
(:*******************************************************:)
xs:date("1999-05-31Z") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs430.txt')
!
test_CastAs431
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs431:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:boolean:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs432
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs432:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:base64Binary:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs433
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs433:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:hexBinary:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs434
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs434:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:date(1999-05-31) to xs:anyURI:)
(:*******************************************************:)
xs:date("1999-05-31") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs435
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs435:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05) to xs:untypedAtomic:)
(:*******************************************************:)
xs:gYearMonth("1999-05") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs435.txt')
!
test_CastAs436
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs436:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05) to xs:string:)
(:*******************************************************:)
xs:gYearMonth("1999-05") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs436.txt')
!
test_CastAs437
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs437:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05) to xs:float:)
(:*******************************************************:)
xs:gYearMonth("1999-05") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs438
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs438:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05) to xs:double:)
(:*******************************************************:)
xs:gYearMonth("1999-05") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs439
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs439:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:double:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs440
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs440:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:decimal:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs441
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs441:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:integer:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs442
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs442:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:duration:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs443
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs443:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs444
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs444:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs445
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs445:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:dateTime:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs446
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs446:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:time:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs447
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs447:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:date:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs448
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs448:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05) to xs:gYearMonth:)
(:*******************************************************:)
xs:gYearMonth("1999-05") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs448.txt')
!
test_CastAs449
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs449:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(-0012-12-05:00) to xs:gYearMonth:)
(:*******************************************************:)
xs:gYearMonth("-0012-12-05:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs449.txt')
!
test_CastAs450
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs450:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:gYearMonth:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs450.txt')
!
test_CastAs451
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs451:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:gYear:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs452
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs452:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:gMonthDay:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs453
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs453:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:gDay:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs454
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs454:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:gMonth:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs455
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs455:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:boolean:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs456
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs456:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:base64Binary:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs457
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs457:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:hexBinary:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs458
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs458:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYearMonth(1999-05Z) to xs:anyURI:)
(:*******************************************************:)
xs:gYearMonth("1999-05Z") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs459
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs459:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:untypedAtomic:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs459.txt')
!
test_CastAs460
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs460:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:string:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs460.txt')
!
test_CastAs461
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs461:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:float:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs462
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs462:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:double:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs463
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs463:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:decimal:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs464
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs464:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:integer:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs465
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs465:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:duration:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs466
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs466:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs467
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs467:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:dateTime:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs468
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs468:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:55-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:time:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs469
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs469:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:date:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs470
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs470:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:gYearMonth:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs471
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs471:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:gYear:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs471.txt')
!
test_CastAs472
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs472:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(-0012-05:00) to xs:gYear:)
(:*******************************************************:)
xs:gYear("-0012-05:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs472.txt')
!
test_CastAs473
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs473:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999Z) to xs:gYear:)
(:*******************************************************:)
xs:gYear("1999Z") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs473.txt')
!
test_CastAs474
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs474:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:gMonthDay:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs475
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs475:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:gDay:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs476
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs476:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:gMonth:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs477
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs477:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:boolean:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs478
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs478:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:base64Binary:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs479
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs479:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:hexBinary:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs480
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs480:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gYear(1999) to xs:anyURI:)
(:*******************************************************:)
xs:gYear("1999") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs481
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs481:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:untypedAtomic:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs481.txt')
!
test_CastAs482
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs482:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:string:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs482.txt')
!
test_CastAs483
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs483:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:float:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs484
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs484:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:double:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs485
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs485:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:decimal:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs486
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs486:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:integer:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs487
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs487:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:duration:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs488
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs488:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs489
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs489:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs490
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs490:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:dateTime:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs491
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs491:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:time:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs492
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs492:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:date:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs493
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs493:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:gYearMonth:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs494
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs494:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:gYear:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs495
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs495:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:gMonthDay:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs495.txt')
!
test_CastAs496
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs496:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--12-03-05:00) to xs:gMonthDay:)
(:*******************************************************:)
xs:gMonthDay("--12-03-05:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs496.txt')
!
test_CastAs497
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs497:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31Z) to xs:gMonthDay:)
(:*******************************************************:)
xs:gMonthDay("--05-31Z") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs497.txt')
!
test_CastAs498
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs498:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:gDay:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs499
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs499:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:gMonth:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs500
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs500:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:boolean:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs501
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs501:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:base64Binary:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs502
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs502:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:hexBinary:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs503
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs503:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonthDay(--05-31) to xs:anyURI:)
(:*******************************************************:)
xs:gMonthDay("--05-31") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs504
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs504:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:untypedAtomic:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs504.txt')
!
test_CastAs505
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs505:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:string:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs505.txt')
!
test_CastAs506
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs506:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:float:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs507
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs507:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:double:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs508
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs508:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:decimal:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs509
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs509:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:integer:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs510
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs510:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:duration:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs511
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs511:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs512
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs512:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs513
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs513:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:dateTime:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs514
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs514:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:time:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs515
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs515:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:date:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs516
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs516:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:gYearMonth:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs517
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs517:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:gYear:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs518
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs518:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:gMonthDay:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs519
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs519:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:gDay:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs519.txt')
!
test_CastAs520
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs520:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---03-05:00) to xs:gDay:)
(:*******************************************************:)
xs:gDay("---03-05:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs520.txt')
!
test_CastAs521
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs521:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31Z) to xs:gDay:)
(:*******************************************************:)
xs:gDay("---31Z") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs521.txt')
!
test_CastAs522
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs522:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:gMonth:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs523
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs523:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:boolean:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs524
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs524:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:base64Binary:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs525
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs525:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:hexBinary:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs526
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs526:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gDay(---31) to xs:anyURI:)
(:*******************************************************:)
xs:gDay("---31") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs527
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs527:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:untypedAtomic:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs527.txt')
!
test_CastAs528
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs528:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:string:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs528.txt')
!
test_CastAs529
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs529:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:float:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs530
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs530:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:double:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs531
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs531:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:decimal:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs532
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs532:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:integer:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs533
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs533:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:duration:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs534
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs534:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs535
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs535:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs536
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs536:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:dateTime:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs537
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs537:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:time:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs538
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs538:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:date:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs539
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs539:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:gYearMonth:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs540
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs540:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:gYear:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs541
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs541:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:gMonthDay:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs542
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs542:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:gDay:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs543
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs543:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:gMonth:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs543.txt')
!
test_CastAs544
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs544:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--12-05:00) to xs:gMonth:)
(:*******************************************************:)
xs:gMonth("--12-05:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs544.txt')
!
test_CastAs545
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs545:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05Z) to xs:gMonth:)
(:*******************************************************:)
xs:gMonth("--05Z") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs545.txt')
!
test_CastAs546
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs546:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:boolean:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs547
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs547:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:base64Binary:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs548
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs548:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:hexBinary:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs549
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs549:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:gMonth(--05) to xs:anyURI:)
(:*******************************************************:)
xs:gMonth("--05") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs550
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs550:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:untypedAtomic:)
(:*******************************************************:)
xs:boolean("true") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs550.txt')
!
test_CastAs551
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs551:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:string:)
(:*******************************************************:)
xs:boolean("true") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs551.txt')
!
test_CastAs552
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs552:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:float:)
(:*******************************************************:)
xs:boolean("true") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs552.txt')
!
test_CastAs553
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs553:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(false) to xs:float:)
(:*******************************************************:)
xs:boolean("false") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs553.txt')
!
test_CastAs554
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs554:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:double:)
(:*******************************************************:)
xs:boolean("true") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs554.txt')
!
test_CastAs555
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs555:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(false) to xs:double:)
(:*******************************************************:)
xs:boolean("false") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs555.txt')
!
test_CastAs556
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs556:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:decimal:)
(:*******************************************************:)
xs:boolean("true") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs556.txt')
!
test_CastAs557
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs557:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(false) to xs:decimal:)
(:*******************************************************:)
xs:boolean("false") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs557.txt')
!
test_CastAs558
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs558:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:integer:)
(:*******************************************************:)
xs:boolean("true") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs558.txt')
!
test_CastAs559
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs559:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(false) to xs:integer:)
(:*******************************************************:)
xs:boolean("false") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs559.txt')
!
test_CastAs560
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs560:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:duration:)
(:*******************************************************:)
xs:boolean("true") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs561
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs561:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:boolean("true") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs562
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs562:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:boolean("true") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs563
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs563:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:dateTime:)
(:*******************************************************:)
xs:boolean("true") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs564
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs564:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:time:)
(:*******************************************************:)
xs:boolean("true") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs565
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs565:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:date:)
(:*******************************************************:)
xs:boolean("true") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs566
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs566:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:gYearMonth:)
(:*******************************************************:)
xs:boolean("true") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs567
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs567:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:gYear:)
(:*******************************************************:)
xs:boolean("true") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs568
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs568:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:gMonthDay:)
(:*******************************************************:)
xs:boolean("true") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs569
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs569:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:gDay:)
(:*******************************************************:)
xs:boolean("true") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs570
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs570:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:gMonth:)
(:*******************************************************:)
xs:boolean("true") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs571
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs571:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:boolean:)
(:*******************************************************:)
xs:boolean("true") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs571.txt')
!
test_CastAs572
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs572:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(false) to xs:boolean:)
(:*******************************************************:)
xs:boolean("false") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs572.txt')
!
test_CastAs573
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs573:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:base64Binary:)
(:*******************************************************:)
xs:boolean("true") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs574
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs574:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:hexBinary:)
(:*******************************************************:)
xs:boolean("true") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs575
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs575:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:boolean(true) to xs:anyURI:)
(:*******************************************************:)
xs:boolean("true") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs576
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs576:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:base64Binary(01001010) to xs:untypedAtomic:)
(:*******************************************************:)
xs:base64Binary("01001010") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs576.txt')
!
test_CastAs577
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs577:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:56-07:00:)
(:Purpose:Try casting xs:base64Binary(0FB7) to xs:untypedAtomic:)
(:*******************************************************:)
xs:base64Binary("0FB7") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs577.txt')
!
test_CastAs578
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs578:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(01001010) to xs:string:)
(:*******************************************************:)
xs:base64Binary("01001010") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs578.txt')
!
test_CastAs579
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs579:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(0FB7) to xs:string:)
(:*******************************************************:)
xs:base64Binary("0FB7") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs579.txt')
!
test_CastAs580
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs580:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:float:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs581
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs581:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:double:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs582
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs582:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:decimal:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs583
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs583:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:integer:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs584
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs584:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:duration:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs585
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs585:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs586
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs586:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs587
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs587:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:dateTime:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs588
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs588:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:time:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs589
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs589:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:date:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs590
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs590:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:gYearMonth:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs591
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs591:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:gYear:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs592
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs592:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:gMonthDay:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs593
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs593:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:gDay:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs594
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs594:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:gMonth:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs595
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs595:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:boolean:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs596
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs596:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(01001010) to xs:base64Binary:)
(:*******************************************************:)
xs:base64Binary("01001010") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs596.txt')
!
test_CastAs597
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs597:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(0FB7) to xs:base64Binary:)
(:*******************************************************:)
xs:base64Binary("0FB7") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs597.txt')
!
test_CastAs598
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs598:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(00000000) to xs:hexBinary:)
(:*******************************************************:)
xs:base64Binary("00000000") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs598.txt')
!
test_CastAs599
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs599:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:hexBinary:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs599.txt')
!
test_CastAs600
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs600:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(aA+zZ/09) to xs:hexBinary:)
(:*******************************************************:)
xs:base64Binary("aA+zZ/09") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs600.txt')
!
test_CastAs601
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs601:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(0FB7) to xs:hexBinary:)
(:*******************************************************:)
xs:base64Binary("0FB7") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs601.txt')
!
test_CastAs602
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs602:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:base64Binary(10010101) to xs:anyURI:)
(:*******************************************************:)
xs:base64Binary("10010101") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs603
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs603:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:untypedAtomic:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs603.txt')
!
test_CastAs604
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs604:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:string:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs604.txt')
!
test_CastAs605
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs605:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:float:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs606
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs606:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:double:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs607
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs607:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:decimal:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs608
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs608:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:integer:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs609
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs609:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:duration:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs610
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs610:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs611
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs611:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs612
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs612:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:dateTime:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs613
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs613:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:time:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs614
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs614:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:date:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs615
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs615:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:gYearMonth:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs616
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs616:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:gYear:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs617
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs617:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:gMonthDay:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs618
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs618:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:gDay:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs619
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs619:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:gMonth:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs620
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs620:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:boolean:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs621
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs621:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:base64Binary:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs621.txt')
!
test_CastAs622
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs622:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(0fb7) to xs:base64Binary:)
(:*******************************************************:)
xs:hexBinary("0fb7") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs622.txt')
!
test_CastAs623
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs623:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:hexBinary:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs623.txt')
!
test_CastAs624
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs624:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(d74d35d35d35) to xs:hexBinary:)
(:*******************************************************:)
xs:hexBinary("d74d35d35d35") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs624.txt')
!
test_CastAs625
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs625:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:hexBinary(D74D35D35D35) to xs:anyURI:)
(:*******************************************************:)
xs:hexBinary("D74D35D35D35") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs626
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs626:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:untypedAtomic:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs626.txt')
!
test_CastAs627
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs627:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:string:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs627.txt')
!
test_CastAs628
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs628:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:float:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs629
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs629:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:double:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs630
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs630:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:decimal:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs631
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs631:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:integer:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs632
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs632:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:duration:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs633
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs633:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:yearMonthDuration:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs634
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs634:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:dayTimeDuration:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs635
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs635:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:dateTime:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs636
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs636:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:time:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs637
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs637:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:date:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs638
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs638:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:gYearMonth:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs639
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs639:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:gYear:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs640
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs640:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:gMonthDay:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs641
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs641:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:gDay:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs642
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs642:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:gMonth:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs643
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs643:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:boolean:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs644
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs644:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:base64Binary:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs645
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs645:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:hexBinary:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastAs646
| query result |
query := '
(:*******************************************************:)
(:Test:CastAs646:)
(:Written By:Joanne Tong:)
(:Date:2005-07-21T09:49:57-07:00:)
(:Purpose:Try casting xs:anyURI(http://www.ietf.org/rfc/rfc2396.txt) to xs:anyURI:)
(:*******************************************************:)
xs:anyURI("http://www.ietf.org/rfc/rfc2396.txt") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs646.txt')
!
test_CastAs647
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs647 :)
(:Written By: Carmelo Montanez :)
(:Date: March 29, 2006 :)
(:Purpose: Evaluates casting a string into a decimal. :)
(:may process casting or raise error. This test may have different :)
(: outcomes. :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(2.123456789123456789) cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs647.txt')
!
test_CastAs648
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs648 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into a nonPositiveInteger. :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(-20) cast as xs:nonPositiveInteger
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs648.txt')
!
test_CastAs649
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs649 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:long. :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(20) cast as xs:long
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs649.txt')
!
test_CastAs650
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs650 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:nonNegativeInteger :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(200) cast as xs:nonNegativeInteger
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs650.txt')
!
test_CastAs651
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs651 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:negativeInteger :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(-201) cast as xs:negativeInteger
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs651.txt')
!
test_CastAs652
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs652 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:int :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(20) cast as xs:int
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs652.txt')
!
test_CastAs653
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs653 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:unsignedLong :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(20) cast as xs:unsignedLong
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs653.txt')
!
test_CastAs654
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs654 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:positiveInteger :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(300) cast as xs:positiveInteger
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs654.txt')
!
test_CastAs655
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs655 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:short :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(30) cast as xs:short
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs655.txt')
!
test_CastAs656
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs656 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:unsignedInt :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(300) cast as xs:unsignedInt
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs656.txt')
!
test_CastAs657
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs657 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:byte :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(120) cast as xs:byte
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs657.txt')
!
test_CastAs658
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs658 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:unsignedShort :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(12) cast as xs:unsignedShort
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs658.txt')
!
test_CastAs659
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs659 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a string into an xs:unsignedByte :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
xs:string(12) cast as xs:unsignedByte
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs659.txt')
!
test_CastAs660
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs660 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a long into an xs:short :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:long(120) cast as xs:short
return $var instance of xs:short
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs661
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs661 :)
(:Written By: Carmelo Montanez :)
(:Date: July 10, 2006 :)
(:Purpose: Evaluates casting a short into an xs:long :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:short(120) cast as xs:long
return $var instance of xs:long
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs662
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs662 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:nonPositiveInteger into an xs:negativeInteger :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:nonPositiveInteger(-120) cast as xs:negativeInteger
return $var instance of xs:negativeInteger
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs663
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs663 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:nonNegativeInteger into an xs:positiveInteger :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:nonNegativeInteger(120) cast as xs:positiveInteger
return $var instance of xs:positiveInteger
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs664
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs664 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:short into an xs:unsignedShort :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:short(120) cast as xs:unsignedShort
return $var instance of xs:unsignedShort
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs665
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs665 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:int into an xs:long :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:int(120) cast as xs:long
return $var instance of xs:long
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs666
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs666 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:long into an xs:int :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:long(120) cast as xs:int
return $var instance of xs:int
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs667
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs667 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:unsignedShort into an xs:unsignedInt :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:unsignedShort(120) cast as xs:unsignedInt
return $var instance of xs:unsignedInt
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs668
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs668 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:unsignedInt into an xs:unsignedShort :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:unsignedInt(120) cast as xs:unsignedShort
return $var instance of xs:unsignedShort
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs669
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs669 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates casting a xs:byte into an xs:unsignedByte :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := xs:byte(120) cast as xs:unsignedByte
return $var instance of xs:unsignedByte
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs670
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs670 :)
(:Written By: Carmelo Montanez :)
(:Date: July 11, 2006 :)
(:Purpose: Evaluates overflow of an xs:date time (error FODT0001) :)
(: It adds 9,000 years to a date created in 2006. :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $d1 := "2006-07-12" cast as xs:date
let $oneky := xs:yearMonthDuration("P1000Y")
let $d2 := $d1 + $oneky
let $d3 := $d2 + $oneky
let $d4 := $d3 + $oneky
let $d5 := $d4 + $oneky
let $d6 := $d5 + $oneky
let $d7 := $d6 + $oneky
let $d8 := $d7 + $oneky
let $d9 := $d8 + $oneky
let $d10 := $d9 + $oneky
return $d10
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastAs670.txt')
!
test_CastAs671
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs671 :)
(:Written By: Carmelo Montanez :)
(:Date: July 13, 2006 :)
(:Purpose: Evaluates casting a string as an xs:ENTITY :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := "abc" cast as xs:ENTITY
return $var instance of xs:ENTITY
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_CastAs672
| query result |
query := '
(:*******************************************************:)
(:Test: CastAs672 :)
(:Written By: Carmelo Montanez :)
(:Date: July 13, 2006 :)
(:Purpose: Evaluates casting a sequence of strings as an xs:ENTITY :)
(:*******************************************************:)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
let $var := ("a","b","c") cast as xs:ENTITY
return $var instance of xs:ENTITY
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_CastFOCA0001_1
| query result |
query := '
(: Name: CastFOCA0001:)
(: Description: casting an xs:decimal with a value to big for that type.:)
(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)
xs:decimal(99e100)
'.
self xqtsBind: 'input-context1' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastFOCA0001-1.txt')
!
test_CastFOCA0003_1
| query result |
query := '
(: Name: CastFOCA0003:)
(: Description: casting an xs:integer with a value to big for that type.:)
(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)
xs:integer(99e100)
'.
self xqtsBind: 'input-context1' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/CastFOCA0003-1.txt')
!
test_K2_SeqExprCast_1
| query result |
query := '
(:*******************************************************:)
(: Test: K2-SeqExprCast-1 :)
(: Written by: Frans Englich :)
(: Date: 2006-08-04T17:13:26Z :)
(: Purpose: Cast to xs:QName where the prefix is declared in the prolog. :)
(:*******************************************************:)
declare namespace myPrefix = "http://example.com/";
"myPrefix:ncname" cast as xs:QName eq QName("http://example.com/", "anotherPrefix:ncname")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K2-SeqExprCast-1.txt')
!
test_K2_SeqExprCast_2
| query result |
query := '
(:*******************************************************:)
(: Test: K2-SeqExprCast-2 :)
(: Written by: Frans Englich :)
(: Date: 2006-08-04T17:13:26Z :)
(: Purpose: Casting the empty sequence to xs:QName? is ok. :)
(:*******************************************************:)
empty(() cast as xs:QName?)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K2-SeqExprCast-2.txt')
!
test_K_SeqExprCast_1
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Syntax: only ? is allowed as occurence indicator in "cast as" expressions. :)
(:*******************************************************:)
"string" cast as xs:string*
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_10
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-10 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A non-atomic type is referenced, leading to a syntax error. :)
(:*******************************************************:)
"string" cast as item()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_100
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-100 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `exists(xs:hexBinary("aa"))`. :)
(:*******************************************************:)
exists(xs:hexBinary("aa"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-100.txt')
!
test_K_SeqExprCast_1000
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1000 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1001
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1001 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1001.txt')
!
test_K_SeqExprCast_1002
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1002 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1003
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1003 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1003.txt')
!
test_K_SeqExprCast_1004
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1004 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1005
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1005 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gYear constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:gYear()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1006
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1006 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gYear constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:gYear(
"1999"
,
"1999"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1007
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1007 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:gYear constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:gYear("1999")), 3, 1) instance of xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1007.txt')
!
test_K_SeqExprCast_1008
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1008 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:gYear. :)
(:*******************************************************:)
xs:gYear("
1999
")
eq
xs:gYear("
1999
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1008.txt')
!
test_K_SeqExprCast_1009
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1009 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:gYear. :)
(:*******************************************************:)
xs:gYear("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_101
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-101 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `count(xs:hexBinary(xs:hexBinary("03"))) eq 1`. :)
(:*******************************************************:)
count(xs:hexBinary(xs:hexBinary("03"))) eq 1
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-101.txt')
!
test_K_SeqExprCast_1010
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1010 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "1999" . :)
(:*******************************************************:)
xs:gYear(xs:untypedAtomic(
"1999"
)) eq xs:gYear("1999")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1010.txt')
!
test_K_SeqExprCast_1011
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1011 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:gYear, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:gYear("1999"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1012
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1012 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1012.txt')
!
test_K_SeqExprCast_1013
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1013 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gYear("1999") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1013.txt')
!
test_K_SeqExprCast_1014
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1014 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1014.txt')
!
test_K_SeqExprCast_1015
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1015 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gYear("1999") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1015.txt')
!
test_K_SeqExprCast_1016
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1016 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1017
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1017 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1017.txt')
!
test_K_SeqExprCast_1018
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1018 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1019
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1019 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1019.txt')
!
test_K_SeqExprCast_102
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-102 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("aa")) eq "AA"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("aa")) eq "AA"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-102.txt')
!
test_K_SeqExprCast_1020
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1020 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1021
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1021 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1021.txt')
!
test_K_SeqExprCast_1022
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1022 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1023
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1023 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1023.txt')
!
test_K_SeqExprCast_1024
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1024 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1025
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1025 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1025.txt')
!
test_K_SeqExprCast_1026
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1026 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1027
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1027 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1027.txt')
!
test_K_SeqExprCast_1028
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1028 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1029
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1029 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1029.txt')
!
test_K_SeqExprCast_103
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-103 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("0a")) eq "0A"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("0a")) eq "0A"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-103.txt')
!
test_K_SeqExprCast_1030
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1030 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1031
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1031 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1031.txt')
!
test_K_SeqExprCast_1032
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1032 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1033
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1033 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1033.txt')
!
test_K_SeqExprCast_1034
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1034 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1035
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1035 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1035.txt')
!
test_K_SeqExprCast_1036
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1036 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1037
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1037 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1037.txt')
!
test_K_SeqExprCast_1038
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1038 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:gYear is allowed and should always succeed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gYear
eq
xs:gYear("1999")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1038.txt')
!
test_K_SeqExprCast_1039
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1039 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:gYear as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gYear("1999") castable as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1039.txt')
!
test_K_SeqExprCast_104
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-104 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("a0")) eq "A0"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("a0")) eq "A0"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-104.txt')
!
test_K_SeqExprCast_1040
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1040 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1041
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1041 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1041.txt')
!
test_K_SeqExprCast_1042
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1042 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1043
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1043 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1043.txt')
!
test_K_SeqExprCast_1044
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1044 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1045
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1045 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1045.txt')
!
test_K_SeqExprCast_1046
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1046 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1047
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1047 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1047.txt')
!
test_K_SeqExprCast_1048
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1048 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1049
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1049 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1049.txt')
!
test_K_SeqExprCast_105
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-105 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("a4")) eq "A4"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("a4")) eq "A4"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-105.txt')
!
test_K_SeqExprCast_1050
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1050 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1051
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1051 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1051.txt')
!
test_K_SeqExprCast_1052
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1052 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1053
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1053 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1053.txt')
!
test_K_SeqExprCast_1054
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1054 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYear to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:gYear("1999") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1055
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1055 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1055.txt')
!
test_K_SeqExprCast_1056
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1056 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYear as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:gYear("1999") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1057
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1057 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gMonthDay constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:gMonthDay()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1058
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1058 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gMonthDay constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:gMonthDay(
"--11-13"
,
"--11-13"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1059
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1059 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:gMonthDay constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:gMonthDay("--11-13")), 3, 1) instance of xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1059.txt')
!
test_K_SeqExprCast_106
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-106 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("c0")) eq "C0"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("c0")) eq "C0"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-106.txt')
!
test_K_SeqExprCast_1060
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1060 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("
--11-13
")
eq
xs:gMonthDay("
--11-13
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1060.txt')
!
test_K_SeqExprCast_1061
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1061 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1062
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1062 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "--11-13" . :)
(:*******************************************************:)
xs:gMonthDay(xs:untypedAtomic(
"--11-13"
)) eq xs:gMonthDay("--11-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1062.txt')
!
test_K_SeqExprCast_1063
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1063 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:gMonthDay, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:gMonthDay("--11-13"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1064
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1064 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1064.txt')
!
test_K_SeqExprCast_1065
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1065 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1065.txt')
!
test_K_SeqExprCast_1066
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1066 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1066.txt')
!
test_K_SeqExprCast_1067
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1067 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1067.txt')
!
test_K_SeqExprCast_1068
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1068 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1069
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1069 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1069.txt')
!
test_K_SeqExprCast_107
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-107 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("fA")) eq "FA"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("fA")) eq "FA"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-107.txt')
!
test_K_SeqExprCast_1070
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1070 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1071
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1071 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1071.txt')
!
test_K_SeqExprCast_1072
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1072 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1073
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1073 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1073.txt')
!
test_K_SeqExprCast_1074
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1074 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1075
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1075 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1075.txt')
!
test_K_SeqExprCast_1076
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1076 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1077
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1077 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1077.txt')
!
test_K_SeqExprCast_1078
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1078 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1079
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1079 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1079.txt')
!
test_K_SeqExprCast_108
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-108 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("10")) eq "10"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("10")) eq "10"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-108.txt')
!
test_K_SeqExprCast_1080
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1080 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1081
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1081 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1081.txt')
!
test_K_SeqExprCast_1082
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1082 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1083
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1083 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1083.txt')
!
test_K_SeqExprCast_1084
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1084 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1085
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1085 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1085.txt')
!
test_K_SeqExprCast_1086
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1086 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1087
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1087 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1087.txt')
!
test_K_SeqExprCast_1088
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1088 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1089
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1089 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1089.txt')
!
test_K_SeqExprCast_109
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-109 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("031a34123b")) eq "031A34123B"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("031a34123b")) eq "031A34123B"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-109.txt')
!
test_K_SeqExprCast_1090
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1090 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1091
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1091 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1091.txt')
!
test_K_SeqExprCast_1092
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1092 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:gMonthDay is allowed and should always succeed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:gMonthDay
eq
xs:gMonthDay("--11-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1092.txt')
!
test_K_SeqExprCast_1093
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1093 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:gMonthDay as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") castable as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1093.txt')
!
test_K_SeqExprCast_1094
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1094 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1095
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1095 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1095.txt')
!
test_K_SeqExprCast_1096
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1096 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1097
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1097 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1097.txt')
!
test_K_SeqExprCast_1098
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1098 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1099
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1099 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1099.txt')
!
test_K_SeqExprCast_11
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-11 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A non-atomic type is referenced, leading to a syntax error. :)
(:*******************************************************:)
"string" cast as node()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_110
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-110 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("03")) eq "03"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("03")) eq "03"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-110.txt')
!
test_K_SeqExprCast_1100
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1100 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1101
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1101 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1101.txt')
!
test_K_SeqExprCast_1102
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1102 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1103
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1103 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1103.txt')
!
test_K_SeqExprCast_1104
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1104 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1105
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1105 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1105.txt')
!
test_K_SeqExprCast_1106
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1106 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonthDay to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:gMonthDay("--11-13") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1107
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1107 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1107.txt')
!
test_K_SeqExprCast_1108
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1108 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonthDay as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:gMonthDay("--11-13") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1109
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1109 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:gDay constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:gDay()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_111
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-111 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("0c")) eq "0C"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("0c")) eq "0C"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-111.txt')
!
test_K_SeqExprCast_1110
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1110 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:gDay constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:gDay(
"---03"
,
"---03"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1111
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1111 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:gDay constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:gDay("---03")), 3, 1) instance of xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1111.txt')
!
test_K_SeqExprCast_1112
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1112 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:gDay. :)
(:*******************************************************:)
xs:gDay("
---03
")
eq
xs:gDay("
---03
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1112.txt')
!
test_K_SeqExprCast_1113
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1113 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:gDay. :)
(:*******************************************************:)
xs:gDay("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1114
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1114 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "---03" . :)
(:*******************************************************:)
xs:gDay(xs:untypedAtomic(
"---03"
)) eq xs:gDay("---03")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1114.txt')
!
test_K_SeqExprCast_1115
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1115 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:gDay, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:gDay("---03"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1116
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1116 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1116.txt')
!
test_K_SeqExprCast_1117
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1117 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gDay("---03") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1117.txt')
!
test_K_SeqExprCast_1118
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1118 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1118.txt')
!
test_K_SeqExprCast_1119
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1119 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gDay("---03") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1119.txt')
!
test_K_SeqExprCast_112
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-112 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("0b")) eq "0B"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("0b")) eq "0B"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-112.txt')
!
test_K_SeqExprCast_1120
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1120 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1121
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1121 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1121.txt')
!
test_K_SeqExprCast_1122
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1122 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1123
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1123 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1123.txt')
!
test_K_SeqExprCast_1124
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1124 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1125
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1125 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1125.txt')
!
test_K_SeqExprCast_1126
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1126 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1127
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1127 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1127.txt')
!
test_K_SeqExprCast_1128
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1128 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1129
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1129 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1129.txt')
!
test_K_SeqExprCast_113
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-113 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary("3a")) eq "3A"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary("3a")) eq "3A"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-113.txt')
!
test_K_SeqExprCast_1130
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1130 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1131
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1131 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1131.txt')
!
test_K_SeqExprCast_1132
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1132 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1133
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1133 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1133.txt')
!
test_K_SeqExprCast_1134
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1134 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1135
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1135 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1135.txt')
!
test_K_SeqExprCast_1136
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1136 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1137
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1137 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1137.txt')
!
test_K_SeqExprCast_1138
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1138 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1139
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1139 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1139.txt')
!
test_K_SeqExprCast_114
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-114 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An empty string is a valid lexical representation for xs:hexBinary, and means "no data. :)
(:*******************************************************:)
xs:string(xs:hexBinary("")) eq ""
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-114.txt')
!
test_K_SeqExprCast_1140
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1140 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1141
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1141 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1141.txt')
!
test_K_SeqExprCast_1142
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1142 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1143
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1143 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1143.txt')
!
test_K_SeqExprCast_1144
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1144 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1145
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1145 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1145.txt')
!
test_K_SeqExprCast_1146
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1146 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:gDay is allowed and should always succeed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:gDay
eq
xs:gDay("---03")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1146.txt')
!
test_K_SeqExprCast_1147
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1147 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:gDay as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gDay("---03") castable as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1147.txt')
!
test_K_SeqExprCast_1148
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1148 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1149
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1149 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1149.txt')
!
test_K_SeqExprCast_115
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-115 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("=aaabbcd"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1150
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1150 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1151
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1151 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1151.txt')
!
test_K_SeqExprCast_1152
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1152 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1153
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1153 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1153.txt')
!
test_K_SeqExprCast_1154
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1154 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1155
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1155 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1155.txt')
!
test_K_SeqExprCast_1156
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1156 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1157
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1157 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1157.txt')
!
test_K_SeqExprCast_1158
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1158 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gDay to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:gDay("---03") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1159
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1159 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1159.txt')
!
test_K_SeqExprCast_116
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-116 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("F==="))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1160
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1160 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gDay as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:gDay("---03") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1161
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1161 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:gMonth constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:gMonth()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1162
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1162 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:gMonth constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:gMonth(
"--11"
,
"--11"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1163
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1163 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:gMonth constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:gMonth("--11")), 3, 1) instance of xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1163.txt')
!
test_K_SeqExprCast_1164
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1164 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("
--11
")
eq
xs:gMonth("
--11
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1164.txt')
!
test_K_SeqExprCast_1165
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1165 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1166
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1166 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "--11" . :)
(:*******************************************************:)
xs:gMonth(xs:untypedAtomic(
"--11"
)) eq xs:gMonth("--11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1166.txt')
!
test_K_SeqExprCast_1167
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1167 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:gMonth, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:gMonth("--11"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1168
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1168 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1168.txt')
!
test_K_SeqExprCast_1169
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1169 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gMonth("--11") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1169.txt')
!
test_K_SeqExprCast_117
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-117 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("a"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1170
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1170 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1170.txt')
!
test_K_SeqExprCast_1171
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1171 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gMonth("--11") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1171.txt')
!
test_K_SeqExprCast_1172
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1172 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1173
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1173 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1173.txt')
!
test_K_SeqExprCast_1174
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1174 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1175
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1175 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1175.txt')
!
test_K_SeqExprCast_1176
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1176 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1177
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1177 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1177.txt')
!
test_K_SeqExprCast_1178
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1178 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1179
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1179 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1179.txt')
!
test_K_SeqExprCast_118
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-118 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aaaa===="))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1180
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1180 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1181
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1181 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1181.txt')
!
test_K_SeqExprCast_1182
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1182 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1183
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1183 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1183.txt')
!
test_K_SeqExprCast_1184
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1184 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1185
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1185 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1185.txt')
!
test_K_SeqExprCast_1186
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1186 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1187
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1187 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1187.txt')
!
test_K_SeqExprCast_1188
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1188 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1189
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1189 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1189.txt')
!
test_K_SeqExprCast_119
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-119 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aaaa=bcd"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1190
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1190 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1191
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1191 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1191.txt')
!
test_K_SeqExprCast_1192
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1192 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1193
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1193 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1193.txt')
!
test_K_SeqExprCast_1194
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1194 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1195
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1195 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1195.txt')
!
test_K_SeqExprCast_1196
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1196 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1197
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1197 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1197.txt')
!
test_K_SeqExprCast_1198
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1198 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1199
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1199 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1199.txt')
!
test_K_SeqExprCast_12
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-12 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A non-atomic type is referenced, leading to a syntax error. :)
(:*******************************************************:)
"string" cast as attribute()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_120
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-120 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aaaaa======="))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1200
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1200 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:gMonth is allowed and should always succeed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:gMonth
eq
xs:gMonth("--11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1200.txt')
!
test_K_SeqExprCast_1201
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1201 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:gMonth as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gMonth("--11") castable as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1201.txt')
!
test_K_SeqExprCast_1202
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1202 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1203
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1203 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1203.txt')
!
test_K_SeqExprCast_1204
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1204 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1205
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1205 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1205.txt')
!
test_K_SeqExprCast_1206
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1206 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1207
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1207 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1207.txt')
!
test_K_SeqExprCast_1208
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1208 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1209
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1209 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1209.txt')
!
test_K_SeqExprCast_121
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-121 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aaaabcd"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1210
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1210 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:gMonth to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:gMonth("--11") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1211
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1211 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1211.txt')
!
test_K_SeqExprCast_1212
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1212 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:gMonth as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:gMonth("--11") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1213
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1213 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:boolean constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:boolean()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1214
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1214 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:boolean constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:boolean(
"true"
,
"true"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1215
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1215 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:boolean constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:boolean("true")), 3, 1) instance of xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1215.txt')
!
test_K_SeqExprCast_1216
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1216 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:boolean. :)
(:*******************************************************:)
xs:boolean("
true
")
eq
xs:boolean("
true
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1216.txt')
!
test_K_SeqExprCast_1217
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1217 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:boolean. :)
(:*******************************************************:)
xs:boolean("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1218
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1218 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "true" . :)
(:*******************************************************:)
xs:boolean(xs:untypedAtomic(
"true"
)) eq xs:boolean("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1218.txt')
!
test_K_SeqExprCast_1219
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1219 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:boolean that has the lexical value " "true" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:boolean("true"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1219.txt')
!
test_K_SeqExprCast_122
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-122 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aaaabcd|"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1220
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1220 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1220.txt')
!
test_K_SeqExprCast_1221
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1221 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1221.txt')
!
test_K_SeqExprCast_1222
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1222 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1222.txt')
!
test_K_SeqExprCast_1223
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1223 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1223.txt')
!
test_K_SeqExprCast_1224
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1224 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:float is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:float
ne
xs:float("3.4e5")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1224.txt')
!
test_K_SeqExprCast_1225
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1225 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:float as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1225.txt')
!
test_K_SeqExprCast_1226
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1226 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:double is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:double
ne
xs:double("3.3e3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1226.txt')
!
test_K_SeqExprCast_1227
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1227 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:double as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1227.txt')
!
test_K_SeqExprCast_1228
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1228 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:decimal is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:decimal
ne
xs:decimal("10.01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1228.txt')
!
test_K_SeqExprCast_1229
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1229 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:decimal as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1229.txt')
!
test_K_SeqExprCast_123
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-123 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aabb=d=="))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1230
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1230 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:integer is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:integer
ne
xs:integer("6789")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1230.txt')
!
test_K_SeqExprCast_1231
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1231 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:integer as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1231.txt')
!
test_K_SeqExprCast_1232
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1232 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1233
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1233 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1233.txt')
!
test_K_SeqExprCast_1234
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1234 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1235
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1235 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1235.txt')
!
test_K_SeqExprCast_1236
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1236 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1237
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1237 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1237.txt')
!
test_K_SeqExprCast_1238
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1238 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1239
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1239 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1239.txt')
!
test_K_SeqExprCast_124
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-124 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aabbcd=a"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1240
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1240 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1241
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1241 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1241.txt')
!
test_K_SeqExprCast_1242
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1242 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1243
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1243 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1243.txt')
!
test_K_SeqExprCast_1244
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1244 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1245
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1245 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1245.txt')
!
test_K_SeqExprCast_1246
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1246 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1247
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1247 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1247.txt')
!
test_K_SeqExprCast_1248
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1248 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1249
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1249 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1249.txt')
!
test_K_SeqExprCast_125
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-125 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An invalid lexical representation for xs:base64Binary. :)
(:*******************************************************:)
xs:string(xs:base64Binary("abcdefghi"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1250
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1250 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1251
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1251 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1251.txt')
!
test_K_SeqExprCast_1252
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1252 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1253
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1253 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1253.txt')
!
test_K_SeqExprCast_1254
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1254 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:boolean is allowed and should always succeed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:boolean
eq
xs:boolean("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1254.txt')
!
test_K_SeqExprCast_1255
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1255 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:boolean as target type should always evaluate to true. :)
(:*******************************************************:)
xs:boolean("true") castable as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1255.txt')
!
test_K_SeqExprCast_1256
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1256 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1257
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1257 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1257.txt')
!
test_K_SeqExprCast_1258
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1258 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1259
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1259 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1259.txt')
!
test_K_SeqExprCast_126
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-126 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary("0w==")) eq "0w=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary("0w==")) eq "0w=="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-126.txt')
!
test_K_SeqExprCast_1260
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1260 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1261
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1261 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1261.txt')
!
test_K_SeqExprCast_1262
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1262 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:boolean to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:boolean("true") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1263
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1263 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1263.txt')
!
test_K_SeqExprCast_1264
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1264 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:boolean as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:boolean("true") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1265
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1265 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:base64Binary constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:base64Binary()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1266
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1266 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:base64Binary constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:base64Binary(
"aaaa"
,
"aaaa"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1267
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1267 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:base64Binary constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:base64Binary("aaaa")), 3, 1) instance of xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1267.txt')
!
test_K_SeqExprCast_1268
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1268 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:base64Binary. :)
(:*******************************************************:)
xs:base64Binary("
aaaa
")
eq
xs:base64Binary("
aaaa
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1268.txt')
!
test_K_SeqExprCast_1269
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1269 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is a valid lexical representation of xs:base64Binary. :)
(:*******************************************************:)
xs:base64Binary("")
eq
xs:base64Binary("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1269.txt')
!
test_K_SeqExprCast_127
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-127 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary("aaa a")) eq "aaaa"`. :)
(:*******************************************************:)
xs:string(xs:base64Binary("aaa a")) eq "aaaa"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-127.txt')
!
test_K_SeqExprCast_1270
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1270 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "aaaa" . :)
(:*******************************************************:)
xs:base64Binary(xs:untypedAtomic(
"aaaa"
)) eq xs:base64Binary("aaaa")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1270.txt')
!
test_K_SeqExprCast_1271
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1271 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:base64Binary, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:base64Binary("aaaa"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1272
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1272 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1272.txt')
!
test_K_SeqExprCast_1273
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1273 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:base64Binary("aaaa") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1273.txt')
!
test_K_SeqExprCast_1274
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1274 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1274.txt')
!
test_K_SeqExprCast_1275
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1275 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:base64Binary("aaaa") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1275.txt')
!
test_K_SeqExprCast_1276
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1276 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1277
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1277 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1277.txt')
!
test_K_SeqExprCast_1278
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1278 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1279
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1279 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1279.txt')
!
test_K_SeqExprCast_128
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-128 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary("frfhforlksid7453")) eq "frfhforlksid7453"`. :)
(:*******************************************************:)
xs:string(xs:base64Binary("frfhforlksid7453")) eq "frfhforlksid7453"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-128.txt')
!
test_K_SeqExprCast_1280
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1280 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1281
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1281 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1281.txt')
!
test_K_SeqExprCast_1282
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1282 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1283
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1283 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1283.txt')
!
test_K_SeqExprCast_1284
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1284 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1285
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1285 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1285.txt')
!
test_K_SeqExprCast_1286
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1286 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1287
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1287 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1287.txt')
!
test_K_SeqExprCast_1288
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1288 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1289
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1289 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1289.txt')
!
test_K_SeqExprCast_129
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-129 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: If the last tetragram ends in "==" then the previous character must be one of [AQgw]. :)
(:*******************************************************:)
xs:base64Binary("frfhforlksid745323==")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1290
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1290 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1291
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1291 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1291.txt')
!
test_K_SeqExprCast_1292
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1292 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1293
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1293 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1293.txt')
!
test_K_SeqExprCast_1294
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1294 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1295
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1295 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1295.txt')
!
test_K_SeqExprCast_1296
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1296 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1297
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1297 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1297.txt')
!
test_K_SeqExprCast_1298
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1298 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1299
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1299 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1299.txt')
!
test_K_SeqExprCast_13
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-13 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A non-atomic type is referenced, leading to a syntax error. :)
(:*******************************************************:)
"string" cast as empty-sequence()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_130
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-130 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("03"))) eq "Aw=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("03"))) eq "Aw=="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-130.txt')
!
test_K_SeqExprCast_1300
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1300 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1301
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1301 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1301.txt')
!
test_K_SeqExprCast_1302
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1302 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1303
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1303 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1303.txt')
!
test_K_SeqExprCast_1304
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1304 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1305
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1305 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1305.txt')
!
test_K_SeqExprCast_1306
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1306 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1307
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1307 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1307.txt')
!
test_K_SeqExprCast_1308
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1308 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:base64Binary is allowed and should always succeed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:base64Binary
eq
xs:base64Binary("aaaa")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1308.txt')
!
test_K_SeqExprCast_1309
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1309 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:base64Binary as target type should always evaluate to true. :)
(:*******************************************************:)
xs:base64Binary("aaaa") castable as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1309.txt')
!
test_K_SeqExprCast_131
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-131 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("0f3c"))) eq "Dzw="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("0f3c"))) eq "Dzw="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-131.txt')
!
test_K_SeqExprCast_1310
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1310 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:hexBinary is allowed and should always succeed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:hexBinary
ne
xs:hexBinary("0FB7")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1310.txt')
!
test_K_SeqExprCast_1311
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1311 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:hexBinary as target type should always evaluate to true. :)
(:*******************************************************:)
xs:base64Binary("aaaa") castable as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1311.txt')
!
test_K_SeqExprCast_1312
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1312 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1313
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1313 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1313.txt')
!
test_K_SeqExprCast_1314
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1314 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:base64Binary to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:base64Binary("aaaa") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1315
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1315 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1315.txt')
!
test_K_SeqExprCast_1316
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1316 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:base64Binary as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:base64Binary("aaaa") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1317
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1317 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:hexBinary constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:hexBinary()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1318
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1318 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:hexBinary constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:hexBinary(
"0FB7"
,
"0FB7"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1319
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1319 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:hexBinary constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:hexBinary("0FB7")), 3, 1) instance of xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1319.txt')
!
test_K_SeqExprCast_132
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-132 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("12"))) eq "Eg=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("12"))) eq "Eg=="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-132.txt')
!
test_K_SeqExprCast_1320
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1320 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:hexBinary. :)
(:*******************************************************:)
xs:hexBinary("
0FB7
")
eq
xs:hexBinary("
0FB7
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1320.txt')
!
test_K_SeqExprCast_1321
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1321 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is a valid lexical representation of xs:hexBinary. :)
(:*******************************************************:)
xs:hexBinary("")
eq
xs:hexBinary("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1321.txt')
!
test_K_SeqExprCast_1322
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1322 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "0FB7" . :)
(:*******************************************************:)
xs:hexBinary(xs:untypedAtomic(
"0FB7"
)) eq xs:hexBinary("0FB7")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1322.txt')
!
test_K_SeqExprCast_1323
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1323 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:hexBinary, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:hexBinary("0FB7"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1324
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1324 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1324.txt')
!
test_K_SeqExprCast_1325
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1325 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:hexBinary("0FB7") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1325.txt')
!
test_K_SeqExprCast_1326
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1326 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1326.txt')
!
test_K_SeqExprCast_1327
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1327 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:hexBinary("0FB7") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1327.txt')
!
test_K_SeqExprCast_1328
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1328 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1329
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1329 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1329.txt')
!
test_K_SeqExprCast_133
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-133 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("3B"))) eq "Ow=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("3B"))) eq "Ow=="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-133.txt')
!
test_K_SeqExprCast_1330
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1330 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1331
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1331 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1331.txt')
!
test_K_SeqExprCast_1332
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1332 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1333
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1333 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1333.txt')
!
test_K_SeqExprCast_1334
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1334 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1335
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1335 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1335.txt')
!
test_K_SeqExprCast_1336
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1336 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1337
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1337 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1337.txt')
!
test_K_SeqExprCast_1338
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1338 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1339
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1339 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1339.txt')
!
test_K_SeqExprCast_134
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-134 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("69A69A"))) eq "aaaa"`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("69A69A"))) eq "aaaa"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-134.txt')
!
test_K_SeqExprCast_1340
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1340 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1341
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1341 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1341.txt')
!
test_K_SeqExprCast_1342
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1342 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1343
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1343 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1343.txt')
!
test_K_SeqExprCast_1344
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1344 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1345
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1345 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1345.txt')
!
test_K_SeqExprCast_1346
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1346 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1347
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1347 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1347.txt')
!
test_K_SeqExprCast_1348
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1348 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1349
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1349 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1349.txt')
!
test_K_SeqExprCast_135
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-135 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("F43D1234ce8f"))) eq "9D0SNM6P"`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("F43D1234ce8f"))) eq "9D0SNM6P"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-135.txt')
!
test_K_SeqExprCast_1350
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1350 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1351
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1351 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1351.txt')
!
test_K_SeqExprCast_1352
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1352 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1353
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1353 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1353.txt')
!
test_K_SeqExprCast_1354
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1354 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1355
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1355 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1355.txt')
!
test_K_SeqExprCast_1356
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1356 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1357
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1357 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1357.txt')
!
test_K_SeqExprCast_1358
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1358 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1359
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1359 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1359.txt')
!
test_K_SeqExprCast_136
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-136 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("f0"))) eq "8A=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("f0"))) eq "8A=="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-136.txt')
!
test_K_SeqExprCast_1360
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1360 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:base64Binary is allowed and should always succeed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:base64Binary
ne
xs:base64Binary("aaaa")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1360.txt')
!
test_K_SeqExprCast_1361
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1361 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:base64Binary as target type should always evaluate to true. :)
(:*******************************************************:)
xs:hexBinary("0FB7") castable as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1361.txt')
!
test_K_SeqExprCast_1362
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1362 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:hexBinary is allowed and should always succeed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:hexBinary
eq
xs:hexBinary("0FB7")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1362.txt')
!
test_K_SeqExprCast_1363
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1363 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:hexBinary as target type should always evaluate to true. :)
(:*******************************************************:)
xs:hexBinary("0FB7") castable as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1363.txt')
!
test_K_SeqExprCast_1364
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1364 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1365
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1365 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1365.txt')
!
test_K_SeqExprCast_1366
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1366 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:hexBinary to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:hexBinary("0FB7") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1367
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1367 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1367.txt')
!
test_K_SeqExprCast_1368
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1368 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:hexBinary as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:hexBinary("0FB7") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1369
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1369 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:anyURI constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:anyURI()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_137
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-137 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("ffaabbddcceeff0134f001d8ca9bc77899c83e6f7d"))) eq "/6q73czu/wE08AHYypvHeJnIPm99"`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("ffaabbddcceeff0134f001d8ca9bc77899c83e6f7d")))
eq "/6q73czu/wE08AHYypvHeJnIPm99"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-137.txt')
!
test_K_SeqExprCast_1370
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1370 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:anyURI constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:anyURI(
"http://www.example.com/an/arbitrary/URI.ext"
,
"http://www.example.com/an/arbitrary/URI.ext"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1371
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1371 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:anyURI constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:anyURI("http://www.example.com/an/arbitrary/URI.ext")), 3, 1) instance of xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1371.txt')
!
test_K_SeqExprCast_1372
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1372 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:anyURI. :)
(:*******************************************************:)
xs:anyURI("
http://www.example.com/an/arbitrary/URI.ext
")
eq
xs:anyURI("
http://www.example.com/an/arbitrary/URI.ext
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1372.txt')
!
test_K_SeqExprCast_1373
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1373 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is a valid lexical representation of xs:anyURI. :)
(:*******************************************************:)
xs:anyURI("")
eq
xs:anyURI("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1373.txt')
!
test_K_SeqExprCast_1374
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1374 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "http://www.example.com/an/arbitrary/URI.ext" . :)
(:*******************************************************:)
xs:anyURI(xs:untypedAtomic(
"http://www.example.com/an/arbitrary/URI.ext"
)) eq xs:anyURI("http://www.example.com/an/arbitrary/URI.ext")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1374.txt')
!
test_K_SeqExprCast_1375
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1375 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:anyURI that has the lexical value " "http://www.example.com/an/arbitrary/URI.ext" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1375.txt')
!
test_K_SeqExprCast_1376
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1376 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1376.txt')
!
test_K_SeqExprCast_1377
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1377 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1377.txt')
!
test_K_SeqExprCast_1378
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1378 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1378.txt')
!
test_K_SeqExprCast_1379
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1379 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1379.txt')
!
test_K_SeqExprCast_138
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-138 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("ffff"))) eq "//8="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("ffff"))) eq "//8="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-138.txt')
!
test_K_SeqExprCast_1380
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1380 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1381
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1381 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1381.txt')
!
test_K_SeqExprCast_1382
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1382 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1383
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1383 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1383.txt')
!
test_K_SeqExprCast_1384
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1384 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1385
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1385 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1385.txt')
!
test_K_SeqExprCast_1386
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1386 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1387
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1387 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1387.txt')
!
test_K_SeqExprCast_1388
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1388 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1389
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1389 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1389.txt')
!
test_K_SeqExprCast_139
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-139 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("ffff34564321deac9876"))) eq "//80VkMh3qyYdg=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("ffff34564321deac9876")))
eq "//80VkMh3qyYdg=="
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-139.txt')
!
test_K_SeqExprCast_1390
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1390 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1391
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1391 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1391.txt')
!
test_K_SeqExprCast_1392
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1392 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1393
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1393 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1393.txt')
!
test_K_SeqExprCast_1394
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1394 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1395
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1395 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1395.txt')
!
test_K_SeqExprCast_1396
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1396 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1397
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1397 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1397.txt')
!
test_K_SeqExprCast_1398
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1398 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1399
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1399 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1399.txt')
!
test_K_SeqExprCast_14
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-14 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `"1" cast as xs:boolean eq true()`. :)
(:*******************************************************:)
"1" cast as xs:boolean eq true()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-14.txt')
!
test_K_SeqExprCast_140
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-140 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary(xs:base64Binary("Ow=="))) eq "3B"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary(xs:base64Binary("Ow=="))) eq "3B"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-140.txt')
!
test_K_SeqExprCast_1400
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1400 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1401
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1401 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1401.txt')
!
test_K_SeqExprCast_1402
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1402 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1403
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1403 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1403.txt')
!
test_K_SeqExprCast_1404
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1404 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1405
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1405 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1405.txt')
!
test_K_SeqExprCast_1406
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1406 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1407
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1407 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1407.txt')
!
test_K_SeqExprCast_1408
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1408 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1409
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1409 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1409.txt')
!
test_K_SeqExprCast_141
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-141 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:hexBinary(xs:base64Binary("aaa a"))) eq "69A69A"`. :)
(:*******************************************************:)
xs:string(xs:hexBinary(xs:base64Binary("aaa a"))) eq "69A69A"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-141.txt')
!
test_K_SeqExprCast_1410
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1410 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1411
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1411 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1411.txt')
!
test_K_SeqExprCast_1412
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1412 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1413
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1413 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1413.txt')
!
test_K_SeqExprCast_1414
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1414 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1415
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1415 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1415.txt')
!
test_K_SeqExprCast_1416
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1416 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:anyURI is allowed and should always succeed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:anyURI
eq
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1416.txt')
!
test_K_SeqExprCast_1417
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1417 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:anyURI as target type should always evaluate to true. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1417.txt')
!
test_K_SeqExprCast_1418
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1418 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:anyURI to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1419
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1419 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1419.txt')
!
test_K_SeqExprCast_142
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-142 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: An empty string is a valid lexical representation for xs:base64Binary, and means "no data. :)
(:*******************************************************:)
xs:string(xs:base64Binary("")) eq ""
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-142.txt')
!
test_K_SeqExprCast_1420
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1420 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:anyURI as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:anyURI("http://www.example.com/an/arbitrary/URI.ext") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1421
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1421 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:QName constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:QName()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1422
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1422 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:QName constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:QName(
"ncname"
,
"ncname"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1423
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1423 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Verify with "instance of" that the xs:QName constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:QName("ncname")), 3, 1) instance of xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1423.txt')
!
test_K_SeqExprCast_1424
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1424 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:QName. :)
(:*******************************************************:)
xs:QName("
ncname
")
eq
xs:QName("
ncname
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1424.txt')
!
test_K_SeqExprCast_1425
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1425 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:QName. :)
(:*******************************************************:)
xs:QName("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1426
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1426 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:QName, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:QName("ncname"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1427
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1427 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1427.txt')
!
test_K_SeqExprCast_1428
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1428 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:QName("ncname") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1428.txt')
!
test_K_SeqExprCast_1429
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1429 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1429.txt')
!
test_K_SeqExprCast_143
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-143 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting where the source type typically cannot be determined statically. :)
(:*******************************************************:)
xs:hexBinary(remove(("3B", 1.1), 2) treat as xs:string)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-143.txt')
!
test_K_SeqExprCast_1430
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1430 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:QName("ncname") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1430.txt')
!
test_K_SeqExprCast_1431
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1431 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1432
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1432 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1432.txt')
!
test_K_SeqExprCast_1433
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1433 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1434
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1434 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1434.txt')
!
test_K_SeqExprCast_1435
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1435 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1436
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1436 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1436.txt')
!
test_K_SeqExprCast_1437
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1437 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1438
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1438 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1438.txt')
!
test_K_SeqExprCast_1439
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1439 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_144
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-144 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `(xs:decimal(remove((3e3, 1.1), 1))) eq 1.1`. :)
(:*******************************************************:)
(xs:decimal(remove((3e3, 1.1), 1))) eq 1.1
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-144.txt')
!
test_K_SeqExprCast_1440
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1440 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1440.txt')
!
test_K_SeqExprCast_1441
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1441 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1442
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1442 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1442.txt')
!
test_K_SeqExprCast_1443
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1443 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1444
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1444 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1444.txt')
!
test_K_SeqExprCast_1445
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1445 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1446
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1446 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1446.txt')
!
test_K_SeqExprCast_1447
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1447 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1448
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1448 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1448.txt')
!
test_K_SeqExprCast_1449
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1449 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_145
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-145 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting where the cardinality of the source value is wrong. :)
(:*******************************************************:)
xs:decimal(remove((1, 2, 3), 1))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1450
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1450 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1450.txt')
!
test_K_SeqExprCast_1451
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1451 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1452
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1452 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1452.txt')
!
test_K_SeqExprCast_1453
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1453 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1454
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1454 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1454.txt')
!
test_K_SeqExprCast_1455
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1455 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1456
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1456 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1456.txt')
!
test_K_SeqExprCast_1457
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1457 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1458
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1458 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1458.txt')
!
test_K_SeqExprCast_1459
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1459 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1460
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1460 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1460.txt')
!
test_K_SeqExprCast_1461
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1461 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1462
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1462 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1462.txt')
!
test_K_SeqExprCast_1463
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1463 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1464
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1464 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1464.txt')
!
test_K_SeqExprCast_1465
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1465 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1466
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1466 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1466.txt')
!
test_K_SeqExprCast_1467
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1467 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: Casting from xs:QName to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:QName("ncname") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1468
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1468 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1468.txt')
!
test_K_SeqExprCast_1469
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1469 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as source type and xs:QName as target type should always evaluate to true. :)
(:*******************************************************:)
xs:QName("ncname") castable as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-1469.txt')
!
test_K_SeqExprCast_1470
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1470 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: "castable as" involving xs:QName as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:QName("ncname") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1471
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1471 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:NOTATION constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:NOTATION()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1472
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1472 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: The xs:NOTATION constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:NOTATION(
"prefix:local"
,
"prefix:local"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1473
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1473 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:untypedAtomic)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1474
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1474 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:string)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1475
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1475 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1476
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1476 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1477
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1477 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1478
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1478 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1479
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1479 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_148
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-148 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A preceding plus sign("+") is disallowed for xs:duration. :)
(:*******************************************************:)
xs:duration("+P1Y2M123DT10H30M99S")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1480
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1480 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1481
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1481 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1482
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1482 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1483
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1483 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1484
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1484 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1485
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1485 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1486
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1486 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1487
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1487 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1488
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1488 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1489
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1489 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_149
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-149 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: No zone offset is allowed for xs:duration. :)
(:*******************************************************:)
xs:duration("P1Y2M123DT10H30M99S+08:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1490
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1490 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1491
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1491 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1492
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1492 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1493
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1493 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1494
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1494 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_1495
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-1495 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:39+02:00 :)
(: Purpose: No constructor function exists for xs:NOTATION. :)
(:*******************************************************:)
not(xs:NOTATION("prefix:local") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_15
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-15 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `"true" cast as xs:boolean eq true()`. :)
(:*******************************************************:)
"true" cast as xs:boolean eq true()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-15.txt')
!
test_K_SeqExprCast_150
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-150 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A preceding "P" must always exist in a xs:duration value. :)
(:*******************************************************:)
xs:duration("1Y2M123DT10H30M99S")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_151
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-151 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: At least one number and its designator must be present in a xs:duration value. :)
(:*******************************************************:)
xs:duration("P")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_152
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-152 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: At least one number and its designator must be present in a xs:duration value, a minus sign is insufficient. :)
(:*******************************************************:)
xs:duration("-P")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_153
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-153 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A "T" separator in a xs:duration must be followed by time components. :)
(:*******************************************************:)
xs:duration("P1Y24MT")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_154
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-154 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "P24H" is an invalid lexical representation for xs:duration. :)
(:*******************************************************:)
xs:duration("P24H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_155
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-155 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:duration to xs:string, preceding zeros are handled properly. :)
(:*******************************************************:)
xs:string(xs:duration("P0010Y0010M0010DT0010H0010M0010S"))
eq "P10Y10M10DT10H10M10S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-155.txt')
!
test_K_SeqExprCast_156
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-156 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that a negative xs:duration is properly serialized when cast to xs:string. :)
(:*******************************************************:)
xs:string(xs:duration("-P0010DT0010H0010M0010S"))
eq "-P10DT10H10M10S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-156.txt')
!
test_K_SeqExprCast_157
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-157 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:duration to xs:string, that empty fields are properly serialized. :)
(:*******************************************************:)
xs:string(xs:duration("P0Y0M0DT00H00M00.000S")) eq "PT0S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-157.txt')
!
test_K_SeqExprCast_158
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-158 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:duration to xs:string, that empty components are handled properly. :)
(:*******************************************************:)
xs:string(xs:duration("-PT8H23M0S")) eq "-PT8H23M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-158.txt')
!
test_K_SeqExprCast_159
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-159 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting a xs:duration with zeroed time components to xs:string. :)
(:*******************************************************:)
xs:string(xs:duration("-P2000Y11M5DT0H0M0.000S")) eq "-P2000Y11M5D"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-159.txt')
!
test_K_SeqExprCast_16
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-16 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `"false" cast as xs:boolean eq false()`. :)
(:*******************************************************:)
"false" cast as xs:boolean eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-16.txt')
!
test_K_SeqExprCast_160
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-160 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical lexical representation for the xs:duration value P365D is "P365D". :)
(:*******************************************************:)
xs:string(xs:duration("P365D")) eq "P365D"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-160.txt')
!
test_K_SeqExprCast_161
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-161 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical lexical representation for the xs:duration value P12M is "P1Y". :)
(:*******************************************************:)
xs:string(xs:duration("P12M")) eq "P1Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-161.txt')
!
test_K_SeqExprCast_162
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-162 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical lexical representation for the xs:duration value P31D is "P31D". :)
(:*******************************************************:)
xs:string(xs:duration("P31D")) eq "P31D"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-162.txt')
!
test_K_SeqExprCast_163
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-163 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical lexical representation for the xs:duration value P3Y0M is "P3Y". :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("P3Y0M")) eq "P3Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-163.txt')
!
test_K_SeqExprCast_164
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-164 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:duration value with a small second component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:duration("P31DT3H2M10.001S"))
eq "P31DT3H2M10.001S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-164.txt')
!
test_K_SeqExprCast_165
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-165 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical form of the xs:duration value -PT0S is PT0S. :)
(:*******************************************************:)
xs:string(xs:duration("-PT0S")) eq "PT0S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-165.txt')
!
test_K_SeqExprCast_166
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-166 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting xs:dayTimeDuration to xs:duration. :)
(:*******************************************************:)
xs:string(xs:duration(xs:dayTimeDuration("P31DT3H2M10.001S")))
eq "P31DT3H2M10.001S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-166.txt')
!
test_K_SeqExprCast_167
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-167 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting xs:yearMonthDuration to xs:duration. :)
(:*******************************************************:)
xs:string(xs:duration(xs:yearMonthDuration("P543Y456M")))
eq "P581Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-167.txt')
!
test_K_SeqExprCast_168
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-168 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting a negative xs:dayTimeDuration to xs:duration. :)
(:*******************************************************:)
xs:string(xs:duration(xs:dayTimeDuration("-P31DT3H2M10.001S")))
eq "-P31DT3H2M10.001S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-168.txt')
!
test_K_SeqExprCast_169
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-169 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting a negative xs:yearMonthDuration to xs:duration. :)
(:*******************************************************:)
xs:string(xs:duration(xs:yearMonthDuration("-P543Y456M")))
eq "-P581Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-169.txt')
!
test_K_SeqExprCast_17
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-17 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `"0" cast as xs:boolean eq false()`. :)
(:*******************************************************:)
"0" cast as xs:boolean eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-17.txt')
!
test_K_SeqExprCast_170
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-170 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A preceding plus sign("+") is disallowed for xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("+P3DT10H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_171
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-171 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: No zone offset is allowed for xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT10H+08:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_172
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-172 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A preceding "P" must always exist in a xs:dayTimeDuration value. :)
(:*******************************************************:)
xs:dayTimeDuration("3DT10H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_173
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-173 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: At least one number and its designator must be present in a xs:dayTimeDuration value. :)
(:*******************************************************:)
xs:dayTimeDuration("P")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_174
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-174 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: At least one number and its designator must be present in a xs:dayTimeDuration value, a minus sign is insufficient. :)
(:*******************************************************:)
xs:dayTimeDuration("-P")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_175
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-175 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A "T" separator in a xs:dayTimeDuration must be followed by time components. :)
(:*******************************************************:)
xs:dayTimeDuration("P1DT")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_176
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-176 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:dayTimeDuration to xs:string, that empty fields are properly serialized. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("P0DT00H00M00.000S")) eq "PT0S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-176.txt')
!
test_K_SeqExprCast_177
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-177 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "P1Y12M1D" is an invalid lexical representation for xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("P1Y12M1D")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_178
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-178 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "P24M1D" is an invalid lexical representation for xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("P24M1D")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_179
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-179 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "PDT3H2M10.001S" is an invalid lexical representation for xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("PDT3H2M10.001S")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_18
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-18 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `false() cast as xs:boolean eq false()`. :)
(:*******************************************************:)
false() cast as xs:boolean eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-18.txt')
!
test_K_SeqExprCast_180
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-180 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:dayTimeDuration to xs:string, that preceding zeros are handled properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("P0010DT0010H0010M0010S"))
eq "P10DT10H10M10S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-180.txt')
!
test_K_SeqExprCast_181
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-181 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that a negative xs:dayTimeDuration is properly serialized when cast to xs:string. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("-P0010DT0010H0010M0010S"))
eq "-P10DT10H10M10S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-181.txt')
!
test_K_SeqExprCast_182
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-182 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:dayTimeDuration to xs:string, that empty components are handled properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("-PT8H23M0S")) eq "-PT8H23M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-182.txt')
!
test_K_SeqExprCast_183
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-183 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting a xs:duration with zeroed time components to xs:string. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("-P5DT0H0M0.000S")) eq "-P5D"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-183.txt')
!
test_K_SeqExprCast_184
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-184 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:dayTimeDuration value with a large day component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("P9876DT1M")) eq "P9876DT1M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-184.txt')
!
test_K_SeqExprCast_185
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-185 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:dayTimeDuration value with a large hour component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("PT9876H1M")) eq "P411DT12H1M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-185.txt')
!
test_K_SeqExprCast_186
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-186 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:dayTimeDuration value with a large minute component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("PT6000M")) eq "P4DT4H"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-186.txt')
!
test_K_SeqExprCast_187
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-187 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:dayTimeDuration value with a large second component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("PT1M1231.432S")) eq "PT21M31.432S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-187.txt')
!
test_K_SeqExprCast_188
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-188 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:dayTimeDuration value with a small second component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("P31DT3H2M10.001S"))
eq "P31DT3H2M10.001S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-188.txt')
!
test_K_SeqExprCast_189
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-189 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical form of the xs:dayTimeDuration value -PT0S is PT0S. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("-PT0S")) eq "PT0S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-189.txt')
!
test_K_SeqExprCast_19
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-19 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `not(true() cast as xs:boolean eq false())`. :)
(:*******************************************************:)
not(true() cast as xs:boolean eq false())
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-19.txt')
!
test_K_SeqExprCast_190
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-190 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting xs:duration to xs:dayTimeDuration. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration(xs:duration("P3Y0M31DT3H2M10.001S")))
eq "P31DT3H2M10.001S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-190.txt')
!
test_K_SeqExprCast_191
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-191 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting xs:yearMonthDuration to xs:dayTimeDuration. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration(xs:yearMonthDuration("P543Y456M")))
eq "PT0S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-191.txt')
!
test_K_SeqExprCast_192
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-192 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting a negative xs:duration to xs:dayTimeDuration. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration(xs:duration("-P3Y0M31DT3H2M10.001S")))
eq "-P31DT3H2M10.001S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-192.txt')
!
test_K_SeqExprCast_193
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-193 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting a negative xs:yearMonthDuration to xs:dayTimeDuration. :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration(xs:yearMonthDuration("-P543Y456M")))
eq "PT0S"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-193.txt')
!
test_K_SeqExprCast_194
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-194 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical lexical representation for the xs:dayTimeDuration value P3D is "P3D". :)
(:*******************************************************:)
xs:string(xs:dayTimeDuration("P3D")) eq "P3D"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-194.txt')
!
test_K_SeqExprCast_195
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-195 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A preceding plus sign("+") is disallowed for xs:yearMonthDuration. :)
(:*******************************************************:)
xs:yearMonthDuration("+P20Y15M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_196
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-196 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: No zone offset is allowed for xs:yearMonthDuration. :)
(:*******************************************************:)
xs:yearMonthDuration("P20Y15M+08:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_197
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-197 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A preceding "P" must always exist in a xs:yearMonthDuration value. :)
(:*******************************************************:)
xs:yearMonthDuration("20Y15M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_198
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-198 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: At least one number and its designator must be present in a xs:yearMonthDuration value. :)
(:*******************************************************:)
xs:yearMonthDuration("P")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_199
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-199 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: At least one number and its designator must be present in a xs:yearMonthDuration value, a minus sign is insufficient. :)
(:*******************************************************:)
xs:yearMonthDuration("-P")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_2
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-2 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Syntax: only ? is allowed as occurence indicator in "cast as" expressions. :)
(:*******************************************************:)
"string" cast as xs:string+
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_20
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-20 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:double(3)) eq true()`. :)
(:*******************************************************:)
xs:boolean(xs:double(3)) eq true()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-20.txt')
!
test_K_SeqExprCast_200
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-200 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A "T" separator in a xs:yearMonthDuration is not allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y24MT")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_201
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-201 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "P731D" is an invalid lexical representation for xs:yearMonthDuration. :)
(:*******************************************************:)
xs:yearMonthDuration("P731D")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_202
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-202 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "-P3" is an invalid lexical representation for xs:yearMonthDuration. :)
(:*******************************************************:)
xs:yearMonthDuration("-P3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_203
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-203 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:yearMonthDuration to xs:string, that preceding zeros are handled properly. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("P0010Y0010M")) eq "P10Y10M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-203.txt')
!
test_K_SeqExprCast_204
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-204 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that a negative xs:yearMonthDuration is properly serialized when cast to xs:string. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("-P0010Y0010M")) eq "-P10Y10M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-204.txt')
!
test_K_SeqExprCast_205
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-205 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure that when casting xs:yearMonthDuration to xs:string, that empty fields are properly serialized. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("P0Y0M")) eq "P0M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-205.txt')
!
test_K_SeqExprCast_206
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-206 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:yearMonthDuration value with a large year component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("P2Y323M")) eq "P28Y11M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-206.txt')
!
test_K_SeqExprCast_207
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-207 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that a xs:yearMonthDuration value with a large year and month component is serialized properly. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("-P543Y456M")) eq "-P581Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-207.txt')
!
test_K_SeqExprCast_208
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-208 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: The canonical form of the xs:yearMonthDuration value -P0M is P0M. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration("-P0M")) eq "P0M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-208.txt')
!
test_K_SeqExprCast_209
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-209 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting xs:duration to xs:yearMonthDuration. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration(xs:duration("P3Y0M31DT3H2M10.001S")))
eq "P3Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-209.txt')
!
test_K_SeqExprCast_21
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-21 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:string(1)) eq true()`. :)
(:*******************************************************:)
xs:boolean(xs:string(1)) eq true()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-21.txt')
!
test_K_SeqExprCast_210
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-210 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting xs:dayTimeDuration to xs:yearMonthDuration. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration(xs:dayTimeDuration("P31DT3H2M10.001S")))
eq "P0M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-210.txt')
!
test_K_SeqExprCast_211
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-211 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting a negative xs:duration to xs:yearMonthDuration. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration(xs:duration("-P3Y0M31DT3H2M10.001S")))
eq "-P3Y"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-211.txt')
!
test_K_SeqExprCast_212
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-212 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Simple test of casting a negative xs:dayTimeDuration to xs:yearMonthDuration. :)
(:*******************************************************:)
xs:string(xs:yearMonthDuration(xs:dayTimeDuration("-P31DT3H2M10.001S")))
eq "P0M"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-212.txt')
!
test_K_SeqExprCast_215
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-215 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("1")`. :)
(:*******************************************************:)
xs:gYear("1")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_216
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-216 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("12")`. :)
(:*******************************************************:)
xs:gYear("12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_217
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-217 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("867")`. :)
(:*******************************************************:)
xs:gYear("867")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_218
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-218 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("+1999")`. :)
(:*******************************************************:)
xs:gYear("+1999")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_219
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-219 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("+1999")`. :)
(:*******************************************************:)
xs:gYear("+1999")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_22
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-22 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:integer(3)) eq true()`. :)
(:*******************************************************:)
xs:boolean(xs:integer(3)) eq true()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-22.txt')
!
test_K_SeqExprCast_220
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-220 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("+0000")`. :)
(:*******************************************************:)
xs:gYear("+0000")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_221
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-221 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("1111-")`. :)
(:*******************************************************:)
xs:gYear("1111-")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_222
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-222 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("1111a")`. :)
(:*******************************************************:)
xs:gYear("1111a")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_223
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-223 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("a1111")`. :)
(:*******************************************************:)
xs:gYear("a1111")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_224
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-224 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("1 111")`. :)
(:*******************************************************:)
xs:gYear("1 111")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_225
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-225 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("1111 Z")`. :)
(:*******************************************************:)
xs:gYear("1111 Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_226
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-226 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:gYear("1111 Z")`. :)
(:*******************************************************:)
xs:gYear("1111 Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_227
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-227 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYear: the hour component cannot be -15. :)
(:*******************************************************:)
xs:gYear("1956-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_228
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-228 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYear: the hour component cannot be +15. :)
(:*******************************************************:)
xs:gYear("1956+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_229
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-229 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYear: the minute component cannot be +60. :)
(:*******************************************************:)
xs:gYear("1956+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_23
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-23 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:decimal(3)) eq true()`. :)
(:*******************************************************:)
xs:boolean(xs:decimal(3)) eq true()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-23.txt')
!
test_K_SeqExprCast_230
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-230 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYear: the minute component cannot be -60. :)
(:*******************************************************:)
xs:gYear("1956-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_231
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-231 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "02004" is an invalid lexical representation for xs:gYear. :)
(:*******************************************************:)
xs:gYear("02004")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_232
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-232 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYear: the minute field must always be present. :)
(:*******************************************************:)
xs:gYear("1956-10")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_233
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-233 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gYear to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gYear("1999-00:00")) eq "1999Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-233.txt')
!
test_K_SeqExprCast_234
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-234 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gYear to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gYear("1999+00:00")) eq "1999Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-234.txt')
!
test_K_SeqExprCast_235
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-235 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gYear to xs:string, with timezone "Z" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gYear("1999Z")) eq "1999Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-235.txt')
!
test_K_SeqExprCast_236
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-236 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "10" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("10")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_237
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-237 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "-01" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_238
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-238 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---321" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---321")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_239
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-239 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "--01" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("--01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_24
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-24 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:double(0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:double(0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-24.txt')
!
test_K_SeqExprCast_240
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-240 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "E---01" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("E---01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_241
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-241 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---01E" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---01E")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_242
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-242 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---01-" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---01-")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_243
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-243 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---001" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---001")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_244
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-244 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---32" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---32")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_245
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-245 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---00" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_246
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-246 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---8" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("+--08")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_247
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-247 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "+--08" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("+--08")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_248
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-248 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "+---08" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("+---08")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_249
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-249 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---08 Z" is an invalid lexical representation for xs:gDay. :)
(:*******************************************************:)
xs:gDay("---08 Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_25
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-25 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:string(0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:string(0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-25.txt')
!
test_K_SeqExprCast_250
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-250 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gDay: the hour component cannot be -15. :)
(:*******************************************************:)
xs:gDay("---08-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_251
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-251 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gDay: the hour component cannot be +15. :)
(:*******************************************************:)
xs:gDay("---08+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_252
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-252 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gDay: the minute component cannot be +60. :)
(:*******************************************************:)
xs:gDay("---08+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_253
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-253 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gDay: the minute component cannot be -60. :)
(:*******************************************************:)
xs:gDay("---08-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_254
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-254 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gDay: the minute field must always be present. :)
(:*******************************************************:)
xs:gDay("---08-10")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_255
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-255 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gDay to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gDay("---01-00:00")) eq "---01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-255.txt')
!
test_K_SeqExprCast_256
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-256 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gDay to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gDay("---01+00:00")) eq "---01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-256.txt')
!
test_K_SeqExprCast_257
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-257 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gDay to xs:string, with timezone "Z" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gDay("---01Z")) eq "---01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-257.txt')
!
test_K_SeqExprCast_258
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-258 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "-01" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_259
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-259 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "---01" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("---01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_26
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-26 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:integer(0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:integer(0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-26.txt')
!
test_K_SeqExprCast_260
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-260 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "+--01" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("+--01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_261
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-261 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "--13" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("--13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_262
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-262 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "--431" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("--431")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_263
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-263 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "--11-" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("--11-")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_264
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-264 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "--00" is an invalid lexical representation for xs:gMonth. :)
(:*******************************************************:)
xs:gMonth("--00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_265
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-265 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gMonth: the hour component cannot be -15. :)
(:*******************************************************:)
xs:gMonth("--08-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_266
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-266 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gMonth: the hour component cannot be +15. :)
(:*******************************************************:)
xs:gMonth("--08+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_267
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-267 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gMonth: the minute component cannot be +60. :)
(:*******************************************************:)
xs:gMonth("--08+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_268
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-268 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gMonth: the minute component cannot be -60. :)
(:*******************************************************:)
xs:gMonth("--08-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_269
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-269 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gMonth: the minute field must always be present. :)
(:*******************************************************:)
xs:gMonth("--08-10")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_27
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-27 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:decimal(0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:decimal(0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-27.txt')
!
test_K_SeqExprCast_270
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-270 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gMonth to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gMonth("--01-00:00")) eq "--01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-270.txt')
!
test_K_SeqExprCast_271
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-271 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gMonth to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gMonth("--01+00:00")) eq "--01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-271.txt')
!
test_K_SeqExprCast_272
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-272 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gMonth to xs:string, with timezone "Z" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gMonth("--01Z")) eq "--01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-272.txt')
!
test_K_SeqExprCast_273
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-273 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "--1999-12" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("--1999-12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_274
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-274 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "+1999-12" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("+1999-12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_275
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-275 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "1999-12-" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("1999-12-")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_276
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-276 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "1999--12" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("1999--12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_277
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-277 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "1999-13" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("1999-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_278
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-278 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "1999-00" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("1999-00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_279
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-279 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "02004-08" is an invalid lexical representation for xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("02004-08")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_28
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-28 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:decimal(0.0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:decimal(0.0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-28.txt')
!
test_K_SeqExprCast_280
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-280 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYearMonth: the minute field must always be present. :)
(:*******************************************************:)
xs:gYearMonth("1999-08-10")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_281
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-281 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYearMonth: the hour component cannot be -15. :)
(:*******************************************************:)
xs:gYearMonth("1999-01-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_282
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-282 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYearMonth: the hour component cannot be +15. :)
(:*******************************************************:)
xs:gYearMonth("1999-01+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_283
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-283 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYearMonth: the minute component cannot be +60. :)
(:*******************************************************:)
xs:gYearMonth("1999-01+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_284
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-284 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Testing timezone field in xs:gYearMonth: the minute component cannot be -60. :)
(:*******************************************************:)
xs:gYearMonth("1999-01-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_285
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-285 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gYearMonth to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gYearMonth("1999-01-00:00")) eq "1999-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-285.txt')
!
test_K_SeqExprCast_286
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-286 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gYearMonth to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gYearMonth("1999-01+00:00")) eq "1999-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-286.txt')
!
test_K_SeqExprCast_287
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-287 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Ensure casting xs:gYearMonth to xs:string, with timezone "Z" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gYearMonth("1999-01Z")) eq "1999-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-287.txt')
!
test_K_SeqExprCast_288
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-288 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "-01-12" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("-01-12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_289
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-289 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "+--01-12" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("+--01-12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_29
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-29 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(+0) eq false()`. :)
(:*******************************************************:)
xs:boolean(+0) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-29.txt')
!
test_K_SeqExprCast_290
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-290 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "01-12-" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("01-12-")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_291
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-291 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--01--12" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--01--12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_292
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-292 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--01-00" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--01-00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_293
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-293 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--00-01" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--00-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_294
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-294 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--13-01" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--13-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_295
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-295 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--111-01" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--111-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_296
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-296 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--1967-01" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--1967-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_297
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-297 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--02-31" is an invalid lexical representation for xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay("--02-31")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_298
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-298 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:gMonthDay: the minute field must always be present. :)
(:*******************************************************:)
xs:gMonthDay("--11-08-10")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_299
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-299 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gMonthDay value "--02-30" represents a non-existent date. :)
(:*******************************************************:)
xs:gMonthDay("--02-30")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_3
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-3 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Syntax: only ? is allowed as occurence indicator in "cast as" expressions. :)
(:*******************************************************:)
"string" cast as xs:anyType*
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_30
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-30 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(-0) eq false()`. :)
(:*******************************************************:)
xs:boolean(-0) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-30.txt')
!
test_K_SeqExprCast_300
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-300 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gMonthDay value "--04-31" represents a non-existent date. :)
(:*******************************************************:)
xs:gMonthDay("--04-31")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_301
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-301 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gMonthDay value "--11-31" represents a non-existent date. :)
(:*******************************************************:)
xs:gMonthDay("--11-31")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_302
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-302 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:gMonthDay: the hour component cannot be -15. :)
(:*******************************************************:)
xs:gMonthDay("--01-01-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_303
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-303 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:gMonthDay: the hour component cannot be +15. :)
(:*******************************************************:)
xs:gMonthDay("--01-01+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_304
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-304 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:gMonthDay: the minute component cannot be +60. :)
(:*******************************************************:)
xs:gMonthDay("--01-01+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_305
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-305 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:gMonthDay: the minute component cannot be -60. :)
(:*******************************************************:)
xs:gMonthDay("--01-01-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_306
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-306 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:gMonthDay to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gMonthDay("--01-01-00:00")) eq "--01-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-306.txt')
!
test_K_SeqExprCast_307
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-307 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:gMonthDay to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gMonthDay("--01-01+00:00")) eq "--01-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-307.txt')
!
test_K_SeqExprCast_308
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-308 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:gMonthDay to xs:string, with timezone "Z" is properly handled. :)
(:*******************************************************:)
xs:string(xs:gMonthDay("--01-01Z")) eq "--01-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-308.txt')
!
test_K_SeqExprCast_309
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-309 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple xs:gMonthDay test involving --02-29. :)
(:*******************************************************:)
xs:gMonthDay("--02-29+00:00") eq xs:gMonthDay("--02-29+00:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-309.txt')
!
test_K_SeqExprCast_31
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-31 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:double(+0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:double(+0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-31.txt')
!
test_K_SeqExprCast_310
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-310 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "+2004-08-01T12:44:05" is an invalid lexical representation, a preceding "+" sign is not allowed for xs:dateTime. :)
(:*******************************************************:)
xs:dateTime("+2004-08-01T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_311
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-311 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "02004-08-01T12:44:05" is an invalid lexical representation for xs:dateTime; if the year part has more than four digits, leading zeros are prohibited. :)
(:*******************************************************:)
xs:dateTime("02004-08-01T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_312
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-312 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "00004-08-01T12:44:05" is an invalid lexical representation for xs:dateTime; if the year part has more than four digits, leading zeros are prohibited. :)
(:*******************************************************:)
xs:dateTime("00004-08-01T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_313
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-313 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2004-32-01T12:44:05" is an invalid lexical representation for xs:dateTime; the month part cannot be larger than 32. :)
(:*******************************************************:)
xs:dateTime("2004-32-01T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_314
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-314 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-30T12:44:05" is a non-existent xs:dateTime date. :)
(:*******************************************************:)
xs:dateTime("2002-02-30T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_315
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-315 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-002-15T12:44:05" is an invalid lexical representation for xs:dateTime. :)
(:*******************************************************:)
xs:dateTime("2002-002-15T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_316
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-316 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-150T12:44:05" is an invalid lexical representation for xs:dateTime. :)
(:*******************************************************:)
xs:dateTime("2002-02-150T12:44:05")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_317
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-317 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-15T24:00:00.001" is an invalid lexical representation for xs:dateTime; if hour is 24, seconds part must be 00. :)
(:*******************************************************:)
xs:dateTime("2002-02-15T24:00:00.001")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_318
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-318 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-15T24:01:00" is an invalid lexical representation for xs:dateTime; if hour is 24, minutes part must be 00. :)
(:*******************************************************:)
xs:dateTime("2002-02-15T24:01:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_319
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-319 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-15T25:00:00" is an invalid lexical representation for xs:dateTime; hour part can never be larger than 24. :)
(:*******************************************************:)
xs:dateTime("2002-02-15T25:01:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_32
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-32 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:double(-0)) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:double(-0)) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-32.txt')
!
test_K_SeqExprCast_320
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-320 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-15T21:60:00" is an invalid lexical representation for xs:dateTime; minute part can never be larger than 59. :)
(:*******************************************************:)
xs:dateTime("2002-02-15T21:60:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_321
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-321 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-15T21:01:60" is an invalid lexical representation for xs:dateTime; seconds part can never be larger than 59. :)
(:*******************************************************:)
xs:dateTime("2002-02-15T21:01:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_322
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-322 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--2002-02-15T21:01:23" is an invalid lexical representation for xs:dateTime. :)
(:*******************************************************:)
xs:dateTime("--2002-02-15T21:01:23")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_323
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-323 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:dateTime: the hour component cannot be -15. :)
(:*******************************************************:)
xs:dateTime("1999-12-01T23:59:12.432-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_324
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-324 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:dateTime: the hour component cannot be +15. :)
(:*******************************************************:)
xs:dateTime("1999-12-01T23:59:12.432+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_325
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-325 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:dateTime: the minute component cannot be +60. :)
(:*******************************************************:)
xs:dateTime("1999-12-01T23:59:12.432+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_326
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-326 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:dateTime: the minute component cannot be -60. :)
(:*******************************************************:)
xs:dateTime("1999-12-01T23:59:12.432-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_327
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-327 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:dateTime: the minute field must always be present. :)
(:*******************************************************:)
xs:dateTime("1999-12-01T23:59:12.999-00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_328
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-328 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:gYear. :)
(:*******************************************************:)
xs:gYear(xs:dateTime("2002-11-23T23:12:23.867-00:00")) eq xs:gYear("2002Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-328.txt')
!
test_K_SeqExprCast_329
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-329 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:gYear. :)
(:*******************************************************:)
xs:gYear(xs:dateTime("2002-11-23T23:12:23.867-13:37")) eq xs:gYear("2002-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-329.txt')
!
test_K_SeqExprCast_33
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-33 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(0.0E0) eq false()`. :)
(:*******************************************************:)
xs:boolean(0.0E0) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-33.txt')
!
test_K_SeqExprCast_330
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-330 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth(xs:dateTime("2002-11-23T23:12:23.867-00:00")) eq xs:gYearMonth("2002-11Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-330.txt')
!
test_K_SeqExprCast_331
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-331 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth(xs:dateTime("2002-11-23T23:12:23.867-13:37"))
eq xs:gYearMonth("2002-11-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-331.txt')
!
test_K_SeqExprCast_332
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-332 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:gMonth. :)
(:*******************************************************:)
xs:gMonth(xs:dateTime("2002-11-23T22:12:23.867-00:00")) eq xs:gMonth("--11Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-332.txt')
!
test_K_SeqExprCast_333
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-333 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:gMonth. :)
(:*******************************************************:)
xs:gMonth(xs:dateTime("2002-11-23T22:12:23.867-13:37")) eq xs:gMonth("--11-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-333.txt')
!
test_K_SeqExprCast_334
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-334 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay(xs:dateTime("2002-11-23T22:12:23.867-00:00")) eq xs:gMonthDay("--11-23Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-334.txt')
!
test_K_SeqExprCast_335
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-335 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay(xs:dateTime("2002-11-23T22:12:23.867-13:37")) eq xs:gMonthDay("--11-23-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-335.txt')
!
test_K_SeqExprCast_336
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-336 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:gDay. :)
(:*******************************************************:)
xs:gDay(xs:dateTime("2002-11-23T22:12:23.867-00:00")) eq xs:gDay("---23Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-336.txt')
!
test_K_SeqExprCast_337
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-337 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:gDay. :)
(:*******************************************************:)
xs:gDay(xs:dateTime("2002-11-23T22:12:23.867-13:37")) eq xs:gDay("---23-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-337.txt')
!
test_K_SeqExprCast_338
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-338 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:date. :)
(:*******************************************************:)
xs:date(xs:dateTime("2002-11-23T22:12:23.867-00:00")) eq xs:date("2002-11-23Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-338.txt')
!
test_K_SeqExprCast_339
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-339 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:date. :)
(:*******************************************************:)
xs:date(xs:dateTime("2002-11-23T22:12:23.867-13:37")) eq xs:date("2002-11-23-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-339.txt')
!
test_K_SeqExprCast_34
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-34 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:double("NaN")) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:double("NaN")) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-34.txt')
!
test_K_SeqExprCast_340
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-340 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC timezone to xs:time. :)
(:*******************************************************:)
xs:time(xs:dateTime("2002-11-23T22:12:23.867-00:00")) eq xs:time("22:12:23.867Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-340.txt')
!
test_K_SeqExprCast_341
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-341 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:dateTime with UTC offset to xs:time. :)
(:*******************************************************:)
xs:time(xs:dateTime("2002-11-23T22:12:23.867-13:37")) eq xs:time("22:12:23.867-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-341.txt')
!
test_K_SeqExprCast_342
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-342 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:dateTime to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:dateTime("1999-12-01T23:59:12.999-00:00")) eq
"1999-12-01T23:59:12.999Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-342.txt')
!
test_K_SeqExprCast_343
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-343 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:dateTime to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:dateTime("1999-12-01T23:59:12.432+00:00")) eq
"1999-12-01T23:59:12.432Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-343.txt')
!
test_K_SeqExprCast_344
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-344 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that an empty milli seconds part is not serialized. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.000")) eq
"2002-02-15T21:01:23"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-344.txt')
!
test_K_SeqExprCast_345
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-345 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that milli seconds have no trailing zeros. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.100")) eq
"2002-02-15T21:01:23.1"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-345.txt')
!
test_K_SeqExprCast_346
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-346 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that milli seconds are properly padded with zeros. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.001")) eq
"2002-02-15T21:01:23.001"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-346.txt')
!
test_K_SeqExprCast_347
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-347 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that milli seconds are properly padded with zeros. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.010")) eq
"2002-02-15T21:01:23.01"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-347.txt')
!
test_K_SeqExprCast_348
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-348 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that a milli seconds part of "435" is handled properly. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.435")) eq
"2002-02-15T21:01:23.435"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-348.txt')
!
test_K_SeqExprCast_349
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-349 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that a milli seconds part of "11" is handled properly. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.11")) eq
"2002-02-15T21:01:23.11"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-349.txt')
!
test_K_SeqExprCast_35
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-35 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean(xs:float("NaN")) eq false()`. :)
(:*******************************************************:)
xs:boolean(xs:float("NaN")) eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-35.txt')
!
test_K_SeqExprCast_350
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-350 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:dateTime to xs:string that a milli seconds part of "110" is handled properly. :)
(:*******************************************************:)
xs:string(xs:dateTime("2002-02-15T21:01:23.110")) eq
"2002-02-15T21:01:23.11"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-350.txt')
!
test_K_SeqExprCast_351
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-351 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple xs:dateTime involving time with no milli seconds. :)
(:*******************************************************:)
string(xs:dateTime("2000-08-01T12:44:05")) eq
"2000-08-01T12:44:05"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-351.txt')
!
test_K_SeqExprCast_352
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-352 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The canonical form of an xs:dateTime containing 24:00:00 is the following day at 00:00:00. :)
(:*******************************************************:)
string(xs:dateTime("2004-03-31T24:00:00")) eq "2004-04-01T00:00:00"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-352.txt')
!
test_K_SeqExprCast_353
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-353 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "24:00:00.001" is an invalid lexical representation for xs:time; if hour is 24, seconds part must be 00. :)
(:*******************************************************:)
xs:time("24:00:00.001")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_354
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-354 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "24:01:00" is an invalid lexical representation for xs:time; if hour is 24, minutes part must be 00. :)
(:*******************************************************:)
xs:time("24:01:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_355
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-355 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "25:00:00" is an invalid lexical representation for xs:time; hour part can never be larger than 24. :)
(:*******************************************************:)
xs:time("25:01:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_356
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-356 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "21:60:00" is an invalid lexical representation for xs:time; minute part can never be larger than 59. :)
(:*******************************************************:)
xs:time("21:60:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_357
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-357 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "21:01:60" is an invalid lexical representation for xs:time; seconds part can never be larger than 59. :)
(:*******************************************************:)
xs:time("21:01:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_358
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-358 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "+21:01:50" is an invalid lexical representation for xs:time. :)
(:*******************************************************:)
xs:time("+21:01:50")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_359
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-359 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "-21:01:50" is an invalid lexical representation for xs:time. :)
(:*******************************************************:)
xs:time("-21:01:50")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_36
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-36 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Invalid casting combination, combined with value comparison. :)
(:*******************************************************:)
"12312" cast as xs:boolean eq false()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_360
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-360 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A valid xs:dateTime is an invalid xs:time. :)
(:*******************************************************:)
xs:time("2002-02-15T08:12:12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_361
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-361 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:time: the hour component cannot be -15. :)
(:*******************************************************:)
xs:time("23:59:12.432-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_362
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-362 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:time: the hour component cannot be +15. :)
(:*******************************************************:)
xs:time("23:59:12.432+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_363
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-363 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:time: the minute component cannot be +60. :)
(:*******************************************************:)
xs:time("23:59:12.432+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_364
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-364 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:time: the minute component cannot be -60. :)
(:*******************************************************:)
xs:time("23:59:12.432-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_365
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-365 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:time: the minute field must always be present. :)
(:*******************************************************:)
xs:dateTime("T23:59:12.999-03")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_366
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-366 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple xs:time involving time with no milli seconds. :)
(:*******************************************************:)
string(xs:time("12:44:05")) eq "12:44:05"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-366.txt')
!
test_K_SeqExprCast_367
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-367 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:time to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:time("23:59:12.999-00:00")) eq "23:59:12.999Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-367.txt')
!
test_K_SeqExprCast_368
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-368 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:time to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:time("23:59:12.432+00:00")) eq "23:59:12.432Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-368.txt')
!
test_K_SeqExprCast_369
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-369 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that an empty milli seconds part is not serialized. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.000")) eq "21:01:23"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-369.txt')
!
test_K_SeqExprCast_37
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-37 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `false() cast as xs:string eq "false"`. :)
(:*******************************************************:)
false() cast as xs:string eq "false"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-37.txt')
!
test_K_SeqExprCast_370
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-370 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that milli seconds have no trailing zeros. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.100")) eq "21:01:23.1"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-370.txt')
!
test_K_SeqExprCast_371
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-371 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that milli seconds are properly padded with zeros. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.001")) eq "21:01:23.001"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-371.txt')
!
test_K_SeqExprCast_372
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-372 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that milli seconds are properly padded with zeros. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.010")) eq "21:01:23.01"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-372.txt')
!
test_K_SeqExprCast_373
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-373 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that a milli seconds part of "435" is handled properly. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.435")) eq "21:01:23.435"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-373.txt')
!
test_K_SeqExprCast_374
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-374 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that a milli seconds part of "11" is handled properly. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.11")) eq "21:01:23.11"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-374.txt')
!
test_K_SeqExprCast_375
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-375 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:time to xs:string that a milli seconds part of "110" is handled properly. :)
(:*******************************************************:)
xs:string(xs:time("21:01:23.110")) eq "21:01:23.11"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-375.txt')
!
test_K_SeqExprCast_376
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-376 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The canonical form of an xs:time containing 24:00:00 is 00:00:00. :)
(:*******************************************************:)
string(xs:time("24:00:00")) eq "00:00:00"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-376.txt')
!
test_K_SeqExprCast_377
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-377 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "+2004-08-01" is an invalid lexical representation, a preceding "+" sign is not allowed for xs:date. :)
(:*******************************************************:)
xs:date("+2004-08-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_378
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-378 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "02004-08-01" is an invalid lexical representation for xs:date; if the year part has more than four digits, leading zeros are prohibited. :)
(:*******************************************************:)
xs:date("02004-08-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_379
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-379 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "00004-08-01" is an invalid lexical representation for xs:date; if the year part has more than four digits, leading zeros are prohibited. :)
(:*******************************************************:)
xs:date("00004-08-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_38
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-38 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `true() cast as xs:string eq "true"`. :)
(:*******************************************************:)
true() cast as xs:string eq "true"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-38.txt')
!
test_K_SeqExprCast_380
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-380 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2004-32-01" is an invalid lexical representation for xs:date; the month part cannot be larger than 32. :)
(:*******************************************************:)
xs:date("2004-32-01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_381
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-381 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-30" is a non-existent xs:date date. :)
(:*******************************************************:)
xs:date("2002-02-30")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_382
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-382 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-002-15" is an invalid lexical representation for xs:date. :)
(:*******************************************************:)
xs:date("2002-002-15")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_383
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-383 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "2002-02-150" is an invalid lexical representation for xs:date. :)
(:*******************************************************:)
xs:date("2002-02-150")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_384
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-384 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "--2002-02-15" is an invalid lexical representation for xs:date. :)
(:*******************************************************:)
xs:date("--2002-02-15")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_385
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-385 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A valid xs:dateTime is an invalid xs:date. :)
(:*******************************************************:)
xs:date("2002-02-15T08:12:12")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_386
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-386 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:date: the hour component cannot be -15. :)
(:*******************************************************:)
xs:date("1999-12-01-15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_387
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-387 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:date: the hour component cannot be +15. :)
(:*******************************************************:)
xs:date("1999-12-01+15:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_388
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-388 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:date: the minute component cannot be +60. :)
(:*******************************************************:)
xs:date("1999-12-01+10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_389
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-389 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing timezone field in xs:date: the minute component cannot be -60. :)
(:*******************************************************:)
xs:date("1999-12-01-10:60")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_39
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-39 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `("1" cast as xs:boolean) cast as xs:string eq "true"`. :)
(:*******************************************************:)
("1" cast as xs:boolean) cast as xs:string eq "true"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-39.txt')
!
test_K_SeqExprCast_390
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-390 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Testing datezone field in xs:date: the minute field must always be present. :)
(:*******************************************************:)
xs:dateTime("1999-12-01-03")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_391
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-391 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC timezone to xs:gYear. :)
(:*******************************************************:)
xs:gYear(xs:date("2002-11-23Z")) eq xs:gYear("2002Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-391.txt')
!
test_K_SeqExprCast_392
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-392 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC offset to xs:gYear. :)
(:*******************************************************:)
xs:gYear(xs:date("2002-11-23-13:37")) eq xs:gYear("2002-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-392.txt')
!
test_K_SeqExprCast_393
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-393 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC timezone to xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth(xs:date("2002-11-23Z")) eq xs:gYearMonth("2002-11Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-393.txt')
!
test_K_SeqExprCast_394
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-394 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC offset to xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth(xs:date("2002-11-23-13:37"))
eq xs:gYearMonth("2002-11-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-394.txt')
!
test_K_SeqExprCast_395
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-395 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC timezone to xs:gMonth. :)
(:*******************************************************:)
xs:gMonth(xs:date("2002-11-23-00:00")) eq xs:gMonth("--11Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-395.txt')
!
test_K_SeqExprCast_396
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-396 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC offset to xs:gMonth. :)
(:*******************************************************:)
xs:gMonth(xs:date("2002-11-23-13:37")) eq xs:gMonth("--11-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-396.txt')
!
test_K_SeqExprCast_397
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-397 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC timezone to xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay(xs:date("2002-11-23-00:00")) eq xs:gMonthDay("--11-23Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-397.txt')
!
test_K_SeqExprCast_398
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-398 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC offset to xs:gMonthDay. :)
(:*******************************************************:)
xs:gMonthDay(xs:date("2002-11-23-13:37")) eq xs:gMonthDay("--11-23-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-398.txt')
!
test_K_SeqExprCast_399
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-399 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC timezone to xs:gDay. :)
(:*******************************************************:)
xs:gDay(xs:date("2002-11-23-00:00")) eq xs:gDay("---23Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-399.txt')
!
test_K_SeqExprCast_4
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-4 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "cast as" where the type is invalid. :)
(:*******************************************************:)
"string" cast as xs:anySimpleType
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_40
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-40 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:boolean("0") cast as xs:string eq "false"`. :)
(:*******************************************************:)
xs:boolean("0") cast as xs:string eq "false"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-40.txt')
!
test_K_SeqExprCast_400
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-400 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC offset to xs:gDay. :)
(:*******************************************************:)
xs:gDay(xs:date("2002-11-23-13:37")) eq xs:gDay("---23-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-400.txt')
!
test_K_SeqExprCast_401
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-401 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC timezone to xs:time. :)
(:*******************************************************:)
xs:dateTime(xs:date("2002-11-23-00:00"))
eq xs:dateTime("2002-11-23T00:00:00.000Z")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-401.txt')
!
test_K_SeqExprCast_402
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-402 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Simple test of casting a xs:date with UTC offset to xs:dateTime. :)
(:*******************************************************:)
xs:dateTime(xs:date("2002-11-23-13:37"))
eq xs:dateTime("2002-11-23T00:00:00.000-13:37")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-402.txt')
!
test_K_SeqExprCast_403
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-403 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:date to xs:string, with timezone "-00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:date("1999-12-01-00:00")) eq "1999-12-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-403.txt')
!
test_K_SeqExprCast_404
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-404 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure casting xs:date to xs:string, with timezone "+00:00" is properly handled. :)
(:*******************************************************:)
xs:string(xs:date("1999-12-01+00:00")) eq "1999-12-01Z"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-404.txt')
!
test_K_SeqExprCast_405
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-405 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that an empty milli seconds part is not serialized. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-405.txt')
!
test_K_SeqExprCast_406
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-406 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that milli seconds have no trailing zeros. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-406.txt')
!
test_K_SeqExprCast_407
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-407 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that milli seconds are properly padded with zeros. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-407.txt')
!
test_K_SeqExprCast_408
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-408 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that milli seconds are properly padded with zeros. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-408.txt')
!
test_K_SeqExprCast_409
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-409 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that a milli seconds part of "435" is handled properly. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-409.txt')
!
test_K_SeqExprCast_41
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-41 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `" white space left alone" cast as xs:string eq xs:string(" white space left alone")`. :)
(:*******************************************************:)
" white space left alone" cast as xs:string eq
xs:string(" white space left alone")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-41.txt')
!
test_K_SeqExprCast_410
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-410 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that a milli seconds part of "11" is handled properly. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-410.txt')
!
test_K_SeqExprCast_411
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-411 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Ensure when casting xs:date to xs:string that a milli seconds part of "110" is handled properly. :)
(:*******************************************************:)
xs:string(xs:date("2002-02-15")) eq "2002-02-15"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-411.txt')
!
test_K_SeqExprCast_415
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-415 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:untypedAtomic constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:untypedAtomic()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_416
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-416 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:untypedAtomic constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:untypedAtomic(
"an arbitrary string(untypedAtomic source)"
,
"an arbitrary string(untypedAtomic source)"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_417
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-417 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:untypedAtomic constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:untypedAtomic("an arbitrary string(untypedAtomic source)")), 3, 1) instance of xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-417.txt')
!
test_K_SeqExprCast_418
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-418 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:untypedAtomic. :)
(:*******************************************************:)
xs:untypedAtomic("
an arbitrary string(untypedAtomic source)
")
eq
xs:untypedAtomic("
an arbitrary string(untypedAtomic source)
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-418.txt')
!
test_K_SeqExprCast_419
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-419 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is a valid lexical representation of xs:untypedAtomic. :)
(:*******************************************************:)
xs:untypedAtomic("")
eq
xs:untypedAtomic("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-419.txt')
!
test_K_SeqExprCast_42
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-42 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `(xs:QName("fn:local-name") cast as xs:string) eq "fn:local-name"`. :)
(:*******************************************************:)
(xs:QName("fn:local-name") cast as xs:string) eq "fn:local-name"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-42.txt')
!
test_K_SeqExprCast_420
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-420 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "an arbitrary string(untypedAtomic source)" . :)
(:*******************************************************:)
xs:untypedAtomic(xs:untypedAtomic(
"an arbitrary string(untypedAtomic source)"
)) eq xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-420.txt')
!
test_K_SeqExprCast_421
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-421 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:untypedAtomic that has the lexical value " "an arbitrary string(untypedAtomic source)" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:untypedAtomic("an arbitrary string(untypedAtomic source)"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-421.txt')
!
test_K_SeqExprCast_422
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-422 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:untypedAtomic to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:untypedAtomic("an arbitrary string(untypedAtomic source)") cast as xs:untypedAtomic
eq
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-422.txt')
!
test_K_SeqExprCast_423
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-423 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:untypedAtomic as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:untypedAtomic("an arbitrary string(untypedAtomic source)") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-423.txt')
!
test_K_SeqExprCast_424
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-424 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:untypedAtomic to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:untypedAtomic("an arbitrary string(untypedAtomic source)") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-424.txt')
!
test_K_SeqExprCast_425
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-425 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:untypedAtomic as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:untypedAtomic("an arbitrary string(untypedAtomic source)") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-425.txt')
!
test_K_SeqExprCast_426
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-426 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:untypedAtomic to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:untypedAtomic("an arbitrary string(untypedAtomic source)") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_427
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-427 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:untypedAtomic as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:untypedAtomic("an arbitrary string(untypedAtomic source)") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-427.txt')
!
test_K_SeqExprCast_428
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-428 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:untypedAtomic as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:untypedAtomic("an arbitrary string(untypedAtomic source)") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_429
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-429 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:string constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:string()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_43
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-43 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `(xs:QName("local-name") cast as xs:string) eq "local-name"`. :)
(:*******************************************************:)
(xs:QName("local-name") cast as xs:string) eq "local-name"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-43.txt')
!
test_K_SeqExprCast_430
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-430 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:string constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:string(
"an arbitrary string"
,
"an arbitrary string"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_431
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-431 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:string constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:string("an arbitrary string")), 3, 1) instance of xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-431.txt')
!
test_K_SeqExprCast_432
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-432 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:string. :)
(:*******************************************************:)
xs:string("
an arbitrary string
")
eq
xs:string("
an arbitrary string
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-432.txt')
!
test_K_SeqExprCast_433
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-433 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is a valid lexical representation of xs:string. :)
(:*******************************************************:)
xs:string("")
eq
xs:string("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-433.txt')
!
test_K_SeqExprCast_434
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-434 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "an arbitrary string" . :)
(:*******************************************************:)
xs:string(xs:untypedAtomic(
"an arbitrary string"
)) eq xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-434.txt')
!
test_K_SeqExprCast_435
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-435 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:string that has the lexical value " "an arbitrary string" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:string("an arbitrary string"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-435.txt')
!
test_K_SeqExprCast_436
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-436 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:string to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:string("an arbitrary string") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-436.txt')
!
test_K_SeqExprCast_437
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-437 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:string as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:string("an arbitrary string") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-437.txt')
!
test_K_SeqExprCast_438
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-438 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:string to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:string("an arbitrary string") cast as xs:string
eq
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-438.txt')
!
test_K_SeqExprCast_439
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-439 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:string as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:string("an arbitrary string") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-439.txt')
!
test_K_SeqExprCast_44
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-44 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:anyURI("example.com/")) eq "example.com/"`. :)
(:*******************************************************:)
xs:string(xs:anyURI("example.com/")) eq "example.com/"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-44.txt')
!
test_K_SeqExprCast_440
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-440 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:string as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:string("an arbitrary string") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_441
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-441 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:float constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:float()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_442
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-442 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:float constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:float(
"3.4e5"
,
"3.4e5"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_443
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-443 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:float constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:float("3.4e5")), 3, 1) instance of xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-443.txt')
!
test_K_SeqExprCast_444
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-444 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:float. :)
(:*******************************************************:)
xs:float("
3.4e5
")
eq
xs:float("
3.4e5
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-444.txt')
!
test_K_SeqExprCast_445
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-445 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:float. :)
(:*******************************************************:)
xs:float("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_446
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-446 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "3.4e5" . :)
(:*******************************************************:)
xs:float(xs:untypedAtomic(
"3.4e5"
)) eq xs:float("3.4e5")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-446.txt')
!
test_K_SeqExprCast_447
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-447 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:float that has the lexical value " "3.4e5" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:float("3.4e5"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-447.txt')
!
test_K_SeqExprCast_448
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-448 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-448.txt')
!
test_K_SeqExprCast_449
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-449 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:float("3.4e5") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-449.txt')
!
test_K_SeqExprCast_45
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-45 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:double(3)) eq "3"`. :)
(:*******************************************************:)
xs:string(xs:double(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-45.txt')
!
test_K_SeqExprCast_450
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-450 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-450.txt')
!
test_K_SeqExprCast_451
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-451 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:float("3.4e5") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-451.txt')
!
test_K_SeqExprCast_452
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-452 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:float is allowed and should always succeed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:float
eq
xs:float("3.4e5")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-452.txt')
!
test_K_SeqExprCast_453
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-453 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:float as target type should always evaluate to true. :)
(:*******************************************************:)
xs:float("3.4e5") castable as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-453.txt')
!
test_K_SeqExprCast_454
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-454 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:double is allowed and should always succeed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:double
ne
xs:double("3.3e3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-454.txt')
!
test_K_SeqExprCast_455
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-455 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:double as target type should always evaluate to true. :)
(:*******************************************************:)
xs:float("3.4e5") castable as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-455.txt')
!
test_K_SeqExprCast_456
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-456 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_457
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-457 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-457.txt')
!
test_K_SeqExprCast_458
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-458 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_459
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-459 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-459.txt')
!
test_K_SeqExprCast_46
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-46 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:string(3)) eq "3"`. :)
(:*******************************************************:)
xs:string(xs:string(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-46.txt')
!
test_K_SeqExprCast_460
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-460 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_461
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-461 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-461.txt')
!
test_K_SeqExprCast_462
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-462 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_463
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-463 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-463.txt')
!
test_K_SeqExprCast_464
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-464 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_465
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-465 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-465.txt')
!
test_K_SeqExprCast_466
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-466 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_467
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-467 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-467.txt')
!
test_K_SeqExprCast_468
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-468 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_469
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-469 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-469.txt')
!
test_K_SeqExprCast_47
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-47 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:integer(3)) eq "3"`. :)
(:*******************************************************:)
xs:string(xs:integer(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-47.txt')
!
test_K_SeqExprCast_470
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-470 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_471
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-471 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-471.txt')
!
test_K_SeqExprCast_472
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-472 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_473
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-473 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-473.txt')
!
test_K_SeqExprCast_474
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-474 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_475
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-475 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-475.txt')
!
test_K_SeqExprCast_476
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-476 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_477
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-477 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-477.txt')
!
test_K_SeqExprCast_478
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-478 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:boolean is allowed and should always succeed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:boolean
eq
xs:boolean("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-478.txt')
!
test_K_SeqExprCast_479
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-479 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:boolean as target type should always evaluate to true. :)
(:*******************************************************:)
xs:float("3.4e5") castable as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-479.txt')
!
test_K_SeqExprCast_48
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-48 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:decimal(3)) eq "3"`. :)
(:*******************************************************:)
xs:string(xs:decimal(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-48.txt')
!
test_K_SeqExprCast_480
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-480 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_481
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-481 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-481.txt')
!
test_K_SeqExprCast_482
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-482 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_483
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-483 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-483.txt')
!
test_K_SeqExprCast_484
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-484 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_485
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-485 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-485.txt')
!
test_K_SeqExprCast_486
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-486 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:float to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:float("3.4e5") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_487
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-487 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-487.txt')
!
test_K_SeqExprCast_488
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-488 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:float as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:float("3.4e5") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_489
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-489 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:double constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:double()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_49
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-49 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `"untyped a " cast as xs:untypedAtomic eq xs:untypedAtomic("untyped a ")`. :)
(:*******************************************************:)
"untyped a " cast as xs:untypedAtomic
eq xs:untypedAtomic("untyped a ")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-49.txt')
!
test_K_SeqExprCast_490
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-490 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:double constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:double(
"3.3e3"
,
"3.3e3"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_491
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-491 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:double constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:double("3.3e3")), 3, 1) instance of xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-491.txt')
!
test_K_SeqExprCast_492
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-492 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:double. :)
(:*******************************************************:)
xs:double("
3.3e3
")
eq
xs:double("
3.3e3
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-492.txt')
!
test_K_SeqExprCast_493
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-493 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:double. :)
(:*******************************************************:)
xs:double("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_494
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-494 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "3.3e3" . :)
(:*******************************************************:)
xs:double(xs:untypedAtomic(
"3.3e3"
)) eq xs:double("3.3e3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-494.txt')
!
test_K_SeqExprCast_495
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-495 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:double that has the lexical value " "3.3e3" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:double("3.3e3"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-495.txt')
!
test_K_SeqExprCast_496
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-496 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-496.txt')
!
test_K_SeqExprCast_497
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-497 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:double("3.3e3") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-497.txt')
!
test_K_SeqExprCast_498
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-498 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-498.txt')
!
test_K_SeqExprCast_499
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-499 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:double("3.3e3") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-499.txt')
!
test_K_SeqExprCast_5
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-5 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "cast as" where the type is invalid. :)
(:*******************************************************:)
"string" cast as xs:untyped
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_50
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-50 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `false() cast as xs:untypedAtomic eq xs:untypedAtomic("false")`. :)
(:*******************************************************:)
false() cast as xs:untypedAtomic
eq xs:untypedAtomic("false")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-50.txt')
!
test_K_SeqExprCast_500
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-500 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:float is allowed and should always succeed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:float
ne
xs:float("3.4e5")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-500.txt')
!
test_K_SeqExprCast_501
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-501 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:float as target type should always evaluate to true. :)
(:*******************************************************:)
xs:double("3.3e3") castable as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-501.txt')
!
test_K_SeqExprCast_502
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-502 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:double is allowed and should always succeed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:double
eq
xs:double("3.3e3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-502.txt')
!
test_K_SeqExprCast_503
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-503 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:double as target type should always evaluate to true. :)
(:*******************************************************:)
xs:double("3.3e3") castable as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-503.txt')
!
test_K_SeqExprCast_504
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-504 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_505
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-505 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-505.txt')
!
test_K_SeqExprCast_506
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-506 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_507
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-507 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-507.txt')
!
test_K_SeqExprCast_508
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-508 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_509
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-509 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-509.txt')
!
test_K_SeqExprCast_51
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-51 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `true() cast as xs:untypedAtomic eq xs:untypedAtomic("true")`. :)
(:*******************************************************:)
true() cast as xs:untypedAtomic
eq xs:untypedAtomic("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-51.txt')
!
test_K_SeqExprCast_510
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-510 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_511
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-511 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-511.txt')
!
test_K_SeqExprCast_512
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-512 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_513
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-513 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-513.txt')
!
test_K_SeqExprCast_514
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-514 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_515
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-515 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-515.txt')
!
test_K_SeqExprCast_516
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-516 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_517
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-517 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-517.txt')
!
test_K_SeqExprCast_518
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-518 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_519
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-519 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-519.txt')
!
test_K_SeqExprCast_52
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-52 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `false() cast as xs:untypedAtomic instance of xs:untypedAtomic`. :)
(:*******************************************************:)
false() cast as xs:untypedAtomic instance of xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-52.txt')
!
test_K_SeqExprCast_520
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-520 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_521
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-521 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-521.txt')
!
test_K_SeqExprCast_522
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-522 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_523
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-523 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-523.txt')
!
test_K_SeqExprCast_524
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-524 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_525
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-525 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-525.txt')
!
test_K_SeqExprCast_526
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-526 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:boolean is allowed and should always succeed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:boolean
eq
xs:boolean("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-526.txt')
!
test_K_SeqExprCast_527
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-527 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:boolean as target type should always evaluate to true. :)
(:*******************************************************:)
xs:double("3.3e3") castable as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-527.txt')
!
test_K_SeqExprCast_528
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-528 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_529
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-529 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-529.txt')
!
test_K_SeqExprCast_53
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-53 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `true() cast as xs:untypedAtomic instance of xs:untypedAtomic`. :)
(:*******************************************************:)
true() cast as xs:untypedAtomic instance of xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-53.txt')
!
test_K_SeqExprCast_530
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-530 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_531
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-531 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-531.txt')
!
test_K_SeqExprCast_532
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-532 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_533
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-533 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-533.txt')
!
test_K_SeqExprCast_534
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-534 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:double to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:double("3.3e3") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_535
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-535 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-535.txt')
!
test_K_SeqExprCast_536
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-536 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:double as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:double("3.3e3") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_537
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-537 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:decimal constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:decimal()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_538
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-538 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:decimal constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:decimal(
"10.01"
,
"10.01"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_539
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-539 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:decimal constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:decimal("10.01")), 3, 1) instance of xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-539.txt')
!
test_K_SeqExprCast_54
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-54 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `(xs:QName("local-name") cast as xs:untypedAtomic) eq xs:untypedAtomic("local-name")`. :)
(:*******************************************************:)
(xs:QName("local-name") cast as xs:untypedAtomic)
eq xs:untypedAtomic("local-name")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-54.txt')
!
test_K_SeqExprCast_540
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-540 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:decimal. :)
(:*******************************************************:)
xs:decimal("
10.01
")
eq
xs:decimal("
10.01
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-540.txt')
!
test_K_SeqExprCast_541
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-541 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:decimal. :)
(:*******************************************************:)
xs:decimal("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_542
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-542 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "10.01" . :)
(:*******************************************************:)
xs:decimal(xs:untypedAtomic(
"10.01"
)) eq xs:decimal("10.01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-542.txt')
!
test_K_SeqExprCast_543
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-543 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:decimal that has the lexical value " "10.01" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:decimal("10.01"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-543.txt')
!
test_K_SeqExprCast_544
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-544 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-544.txt')
!
test_K_SeqExprCast_545
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-545 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-545.txt')
!
test_K_SeqExprCast_546
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-546 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-546.txt')
!
test_K_SeqExprCast_547
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-547 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-547.txt')
!
test_K_SeqExprCast_548
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-548 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:float is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:float
ne
xs:float("3.4e5")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-548.txt')
!
test_K_SeqExprCast_549
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-549 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:float as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-549.txt')
!
test_K_SeqExprCast_55
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-55 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `(xs:QName("fn:local-name") cast as xs:untypedAtomic) eq xs:untypedAtomic("fn:local-name")`. :)
(:*******************************************************:)
(xs:QName("fn:local-name") cast as xs:untypedAtomic)
eq xs:untypedAtomic("fn:local-name")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-55.txt')
!
test_K_SeqExprCast_550
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-550 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:double is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:double
ne
xs:double("3.3e3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-550.txt')
!
test_K_SeqExprCast_551
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-551 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:double as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-551.txt')
!
test_K_SeqExprCast_552
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-552 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:decimal is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:decimal
eq
xs:decimal("10.01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-552.txt')
!
test_K_SeqExprCast_553
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-553 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:decimal as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-553.txt')
!
test_K_SeqExprCast_554
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-554 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:integer is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:integer
ne
xs:integer("6789")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-554.txt')
!
test_K_SeqExprCast_555
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-555 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:integer as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-555.txt')
!
test_K_SeqExprCast_556
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-556 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_557
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-557 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-557.txt')
!
test_K_SeqExprCast_558
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-558 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_559
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-559 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-559.txt')
!
test_K_SeqExprCast_56
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-56 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:untypedAtomic(xs:anyURI("example.com/")) eq "example.com/"`. :)
(:*******************************************************:)
xs:untypedAtomic(xs:anyURI("example.com/")) eq "example.com/"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-56.txt')
!
test_K_SeqExprCast_560
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-560 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_561
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-561 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-561.txt')
!
test_K_SeqExprCast_562
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-562 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_563
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-563 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-563.txt')
!
test_K_SeqExprCast_564
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-564 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_565
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-565 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-565.txt')
!
test_K_SeqExprCast_566
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-566 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_567
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-567 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-567.txt')
!
test_K_SeqExprCast_568
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-568 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_569
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-569 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-569.txt')
!
test_K_SeqExprCast_57
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-57 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:untypedAtomic(xs:double(3)) eq "3"`. :)
(:*******************************************************:)
xs:untypedAtomic(xs:double(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-57.txt')
!
test_K_SeqExprCast_570
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-570 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_571
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-571 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-571.txt')
!
test_K_SeqExprCast_572
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-572 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_573
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-573 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-573.txt')
!
test_K_SeqExprCast_574
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-574 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_575
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-575 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-575.txt')
!
test_K_SeqExprCast_576
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-576 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_577
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-577 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-577.txt')
!
test_K_SeqExprCast_578
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-578 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:boolean is allowed and should always succeed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:boolean
eq
xs:boolean("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-578.txt')
!
test_K_SeqExprCast_579
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-579 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:boolean as target type should always evaluate to true. :)
(:*******************************************************:)
xs:decimal("10.01") castable as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-579.txt')
!
test_K_SeqExprCast_58
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-58 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:untypedAtomic(xs:string(3)) eq "3"`. :)
(:*******************************************************:)
xs:untypedAtomic(xs:string(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-58.txt')
!
test_K_SeqExprCast_580
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-580 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_581
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-581 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-581.txt')
!
test_K_SeqExprCast_582
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-582 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_583
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-583 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-583.txt')
!
test_K_SeqExprCast_584
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-584 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_585
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-585 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-585.txt')
!
test_K_SeqExprCast_586
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-586 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:decimal to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:decimal("10.01") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_587
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-587 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-587.txt')
!
test_K_SeqExprCast_588
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-588 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:decimal as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:decimal("10.01") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_589
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-589 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:integer constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:integer()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_59
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-59 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:untypedAtomic(xs:integer(3)) eq "3"`. :)
(:*******************************************************:)
xs:untypedAtomic(xs:integer(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-59.txt')
!
test_K_SeqExprCast_590
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-590 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:integer constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:integer(
"6789"
,
"6789"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_591
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-591 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:integer constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:integer("6789")), 3, 1) instance of xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-591.txt')
!
test_K_SeqExprCast_592
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-592 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:integer. :)
(:*******************************************************:)
xs:integer("
6789
")
eq
xs:integer("
6789
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-592.txt')
!
test_K_SeqExprCast_593
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-593 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:integer. :)
(:*******************************************************:)
xs:integer("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_594
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-594 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "6789" . :)
(:*******************************************************:)
xs:integer(xs:untypedAtomic(
"6789"
)) eq xs:integer("6789")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-594.txt')
!
test_K_SeqExprCast_595
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-595 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Applying fn:boolean() to a value of type xs:integer that has the lexical value " "6789" " should result in the boolean value true. :)
(:*******************************************************:)
boolean(xs:integer("6789"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-595.txt')
!
test_K_SeqExprCast_596
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-596 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-596.txt')
!
test_K_SeqExprCast_597
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-597 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-597.txt')
!
test_K_SeqExprCast_598
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-598 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-598.txt')
!
test_K_SeqExprCast_599
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-599 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-599.txt')
!
test_K_SeqExprCast_6
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-6 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "cast as" where the type is invalid. :)
(:*******************************************************:)
"string" cast as xs:anyAtomicType
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_60
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-60 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:untypedAtomic(xs:decimal(3)) eq "3"`. :)
(:*******************************************************:)
xs:untypedAtomic(xs:decimal(3)) eq "3"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-60.txt')
!
test_K_SeqExprCast_600
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-600 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:float is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:float
ne
xs:float("3.4e5")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-600.txt')
!
test_K_SeqExprCast_601
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-601 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:float as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-601.txt')
!
test_K_SeqExprCast_602
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-602 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:double is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:double
ne
xs:double("3.3e3")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-602.txt')
!
test_K_SeqExprCast_603
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-603 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:double as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-603.txt')
!
test_K_SeqExprCast_604
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-604 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:decimal is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:decimal
ne
xs:decimal("10.01")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-604.txt')
!
test_K_SeqExprCast_605
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-605 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:decimal as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-605.txt')
!
test_K_SeqExprCast_606
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-606 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:integer is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:integer
eq
xs:integer("6789")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-606.txt')
!
test_K_SeqExprCast_607
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-607 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:integer as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-607.txt')
!
test_K_SeqExprCast_608
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-608 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_609
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-609 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-609.txt')
!
test_K_SeqExprCast_61
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-61 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:notation is not allowed. :)
(:*******************************************************:)
"notation is abstract" cast as xs:NOTATION
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_610
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-610 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_611
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-611 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-611.txt')
!
test_K_SeqExprCast_612
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-612 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_613
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-613 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-613.txt')
!
test_K_SeqExprCast_614
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-614 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_615
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-615 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-615.txt')
!
test_K_SeqExprCast_616
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-616 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_617
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-617 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-617.txt')
!
test_K_SeqExprCast_618
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-618 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_619
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-619 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-619.txt')
!
test_K_SeqExprCast_62
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-62 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:notation is not allowed. :)
(:*******************************************************:)
"notation is abstract" cast as xs:NOTATION?
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_620
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-620 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_621
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-621 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-621.txt')
!
test_K_SeqExprCast_622
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-622 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_623
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-623 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-623.txt')
!
test_K_SeqExprCast_624
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-624 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_625
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-625 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-625.txt')
!
test_K_SeqExprCast_626
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-626 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_627
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-627 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-627.txt')
!
test_K_SeqExprCast_628
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-628 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_629
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-629 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-629.txt')
!
test_K_SeqExprCast_63
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-63 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:notation is not allowed. :)
(:*******************************************************:)
() cast as xs:NOTATION?
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_630
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-630 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:boolean is allowed and should always succeed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:boolean
eq
xs:boolean("true")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-630.txt')
!
test_K_SeqExprCast_631
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-631 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:boolean as target type should always evaluate to true. :)
(:*******************************************************:)
xs:integer("6789") castable as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-631.txt')
!
test_K_SeqExprCast_632
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-632 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_633
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-633 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-633.txt')
!
test_K_SeqExprCast_634
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-634 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_635
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-635 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-635.txt')
!
test_K_SeqExprCast_636
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-636 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_637
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-637 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-637.txt')
!
test_K_SeqExprCast_638
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-638 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:integer to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:integer("6789") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_639
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-639 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-639.txt')
!
test_K_SeqExprCast_64
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-64 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:notation is not allowed. :)
(:*******************************************************:)
() cast as xs:NOTATION
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_640
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-640 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:integer as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:integer("6789") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_641
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-641 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:duration constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:duration()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_642
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-642 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:duration constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:duration(
"P1Y2M3DT10H30M"
,
"P1Y2M3DT10H30M"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_643
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-643 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:duration constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:duration("P1Y2M3DT10H30M")), 3, 1) instance of xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-643.txt')
!
test_K_SeqExprCast_644
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-644 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:duration. :)
(:*******************************************************:)
xs:duration("
P1Y2M3DT10H30M
")
eq
xs:duration("
P1Y2M3DT10H30M
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-644.txt')
!
test_K_SeqExprCast_645
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-645 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:duration. :)
(:*******************************************************:)
xs:duration("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_646
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-646 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "P1Y2M3DT10H30M" . :)
(:*******************************************************:)
xs:duration(xs:untypedAtomic(
"P1Y2M3DT10H30M"
)) eq xs:duration("P1Y2M3DT10H30M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-646.txt')
!
test_K_SeqExprCast_647
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-647 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:duration, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:duration("P1Y2M3DT10H30M"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_648
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-648 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-648.txt')
!
test_K_SeqExprCast_649
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-649 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-649.txt')
!
test_K_SeqExprCast_65
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-65 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:notation is not allowed. :)
(:*******************************************************:)
xs:NOTATION(xs:anyURI("example.com/"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_650
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-650 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-650.txt')
!
test_K_SeqExprCast_651
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-651 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-651.txt')
!
test_K_SeqExprCast_652
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-652 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_653
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-653 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-653.txt')
!
test_K_SeqExprCast_654
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-654 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_655
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-655 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-655.txt')
!
test_K_SeqExprCast_656
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-656 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_657
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-657 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-657.txt')
!
test_K_SeqExprCast_658
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-658 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_659
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-659 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-659.txt')
!
test_K_SeqExprCast_66
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-66 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:notation is not allowed. :)
(:*******************************************************:)
xs:NOTATION(QName("example.com", "p:foo"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_660
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-660 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:duration is allowed and should always succeed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:duration
eq
xs:duration("P1Y2M3DT10H30M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-660.txt')
!
test_K_SeqExprCast_661
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-661 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:duration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") castable as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-661.txt')
!
test_K_SeqExprCast_662
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-662 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:yearMonthDuration is allowed and should always succeed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:yearMonthDuration
ne
xs:yearMonthDuration("P1Y12M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-662.txt')
!
test_K_SeqExprCast_663
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-663 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:yearMonthDuration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") castable as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-663.txt')
!
test_K_SeqExprCast_664
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-664 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:dayTimeDuration is allowed and should always succeed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:dayTimeDuration
ne
xs:dayTimeDuration("P3DT2H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-664.txt')
!
test_K_SeqExprCast_665
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-665 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:dayTimeDuration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") castable as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-665.txt')
!
test_K_SeqExprCast_666
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-666 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_667
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-667 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-667.txt')
!
test_K_SeqExprCast_668
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-668 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_669
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-669 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-669.txt')
!
test_K_SeqExprCast_67
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-67 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting to xs:QName where the cardinality is wrong. :)
(:*******************************************************:)
() cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_670
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-670 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_671
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-671 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-671.txt')
!
test_K_SeqExprCast_672
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-672 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_673
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-673 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-673.txt')
!
test_K_SeqExprCast_674
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-674 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_675
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-675 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-675.txt')
!
test_K_SeqExprCast_676
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-676 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_677
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-677 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-677.txt')
!
test_K_SeqExprCast_678
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-678 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_679
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-679 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-679.txt')
!
test_K_SeqExprCast_68
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-68 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Input when casting to xs:QName must be a string literal. :)
(:*******************************************************:)
3 cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_680
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-680 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_681
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-681 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-681.txt')
!
test_K_SeqExprCast_682
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-682 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_683
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-683 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-683.txt')
!
test_K_SeqExprCast_684
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-684 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_685
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-685 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-685.txt')
!
test_K_SeqExprCast_686
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-686 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_687
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-687 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-687.txt')
!
test_K_SeqExprCast_688
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-688 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_689
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-689 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-689.txt')
!
test_K_SeqExprCast_69
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-69 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Input when casting to xs:QName must be a string literal. :)
(:*******************************************************:)
. cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_690
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-690 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:duration to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:duration("P1Y2M3DT10H30M") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_691
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-691 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-691.txt')
!
test_K_SeqExprCast_692
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-692 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:duration as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:duration("P1Y2M3DT10H30M") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_693
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-693 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:yearMonthDuration constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:yearMonthDuration()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_694
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-694 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:yearMonthDuration constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:yearMonthDuration(
"P1Y12M"
,
"P1Y12M"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_695
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-695 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:yearMonthDuration constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:yearMonthDuration("P1Y12M")), 3, 1) instance of xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-695.txt')
!
test_K_SeqExprCast_696
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-696 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:yearMonthDuration. :)
(:*******************************************************:)
xs:yearMonthDuration("
P1Y12M
")
eq
xs:yearMonthDuration("
P1Y12M
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-696.txt')
!
test_K_SeqExprCast_697
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-697 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:yearMonthDuration. :)
(:*******************************************************:)
xs:yearMonthDuration("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_698
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-698 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "P1Y12M" . :)
(:*******************************************************:)
xs:yearMonthDuration(xs:untypedAtomic(
"P1Y12M"
)) eq xs:yearMonthDuration("P1Y12M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-698.txt')
!
test_K_SeqExprCast_699
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-699 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:yearMonthDuration, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:yearMonthDuration("P1Y12M"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_7
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-7 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: "cast as" where the type is invalid. :)
(:*******************************************************:)
"string" cast as xs:anyType
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_70
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-70 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting a xs:QName value to xs:QName is possible. :)
(:*******************************************************:)
(xs:QName("local-name") cast as xs:QName) eq xs:QName("local-name")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-70.txt')
!
test_K_SeqExprCast_700
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-700 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-700.txt')
!
test_K_SeqExprCast_701
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-701 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-701.txt')
!
test_K_SeqExprCast_702
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-702 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-702.txt')
!
test_K_SeqExprCast_703
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-703 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-703.txt')
!
test_K_SeqExprCast_704
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-704 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_705
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-705 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-705.txt')
!
test_K_SeqExprCast_706
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-706 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_707
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-707 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-707.txt')
!
test_K_SeqExprCast_708
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-708 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_709
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-709 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-709.txt')
!
test_K_SeqExprCast_71
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-71 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Casting xs:untypedAtomic to xs:QName is an error. :)
(:*******************************************************:)
xs:untypedAtomic("ncname") cast as xs:QName?
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_710
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-710 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_711
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-711 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-711.txt')
!
test_K_SeqExprCast_712
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-712 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:duration is allowed and should always succeed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:duration
ne
xs:duration("P1Y2M3DT10H30M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-712.txt')
!
test_K_SeqExprCast_713
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-713 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:duration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") castable as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-713.txt')
!
test_K_SeqExprCast_714
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-714 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:yearMonthDuration is allowed and should always succeed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:yearMonthDuration
eq
xs:yearMonthDuration("P1Y12M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-714.txt')
!
test_K_SeqExprCast_715
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-715 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:yearMonthDuration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") castable as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-715.txt')
!
test_K_SeqExprCast_716
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-716 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:dayTimeDuration is allowed and should always succeed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:dayTimeDuration
ne
xs:dayTimeDuration("P3DT2H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-716.txt')
!
test_K_SeqExprCast_717
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-717 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:dayTimeDuration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") castable as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-717.txt')
!
test_K_SeqExprCast_718
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-718 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_719
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-719 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-719.txt')
!
test_K_SeqExprCast_72
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-72 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `"example.com/" cast as xs:anyURI eq xs:anyURI("example.com/")`. :)
(:*******************************************************:)
"example.com/" cast as xs:anyURI eq
xs:anyURI("example.com/")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-72.txt')
!
test_K_SeqExprCast_720
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-720 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_721
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-721 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-721.txt')
!
test_K_SeqExprCast_722
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-722 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_723
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-723 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-723.txt')
!
test_K_SeqExprCast_724
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-724 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_725
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-725 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-725.txt')
!
test_K_SeqExprCast_726
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-726 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_727
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-727 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-727.txt')
!
test_K_SeqExprCast_728
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-728 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_729
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-729 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-729.txt')
!
test_K_SeqExprCast_73
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-73 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:untypedAtomic("example.com/") cast as xs:anyURI eq xs:anyURI("example.com/")`. :)
(:*******************************************************:)
xs:untypedAtomic("example.com/") cast as xs:anyURI eq
xs:anyURI("example.com/")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-73.txt')
!
test_K_SeqExprCast_730
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-730 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_731
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-731 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-731.txt')
!
test_K_SeqExprCast_732
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-732 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_733
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-733 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-733.txt')
!
test_K_SeqExprCast_734
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-734 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_735
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-735 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-735.txt')
!
test_K_SeqExprCast_736
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-736 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_737
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-737 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-737.txt')
!
test_K_SeqExprCast_738
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-738 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_739
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-739 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-739.txt')
!
test_K_SeqExprCast_74
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-74 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:anyURI("example.com/") cast as xs:anyURI eq xs:anyURI("example.com/")`. :)
(:*******************************************************:)
xs:anyURI("example.com/") cast as xs:anyURI eq
xs:anyURI("example.com/")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-74.txt')
!
test_K_SeqExprCast_740
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-740 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_741
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-741 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-741.txt')
!
test_K_SeqExprCast_742
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-742 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:yearMonthDuration to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:yearMonthDuration("P1Y12M") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_743
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-743 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-743.txt')
!
test_K_SeqExprCast_744
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-744 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:yearMonthDuration as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:yearMonthDuration("P1Y12M") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_745
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-745 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:dayTimeDuration constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:dayTimeDuration()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_746
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-746 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:dayTimeDuration constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:dayTimeDuration(
"P3DT2H"
,
"P3DT2H"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_747
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-747 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:dayTimeDuration constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:dayTimeDuration("P3DT2H")), 3, 1) instance of xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-747.txt')
!
test_K_SeqExprCast_748
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-748 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("
P3DT2H
")
eq
xs:dayTimeDuration("
P3DT2H
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-748.txt')
!
test_K_SeqExprCast_749
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-749 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:dayTimeDuration. :)
(:*******************************************************:)
xs:dayTimeDuration("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_75
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-75 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:double(3) eq 3`. :)
(:*******************************************************:)
xs:double(3) eq 3
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-75.txt')
!
test_K_SeqExprCast_750
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-750 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "P3DT2H" . :)
(:*******************************************************:)
xs:dayTimeDuration(xs:untypedAtomic(
"P3DT2H"
)) eq xs:dayTimeDuration("P3DT2H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-750.txt')
!
test_K_SeqExprCast_751
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-751 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:dayTimeDuration, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:dayTimeDuration("P3DT2H"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_752
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-752 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-752.txt')
!
test_K_SeqExprCast_753
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-753 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-753.txt')
!
test_K_SeqExprCast_754
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-754 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-754.txt')
!
test_K_SeqExprCast_755
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-755 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-755.txt')
!
test_K_SeqExprCast_756
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-756 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_757
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-757 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-757.txt')
!
test_K_SeqExprCast_758
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-758 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_759
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-759 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-759.txt')
!
test_K_SeqExprCast_76
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-76 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:double(3.1) eq 3.1`. :)
(:*******************************************************:)
xs:double(3.1) eq 3.1
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-76.txt')
!
test_K_SeqExprCast_760
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-760 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_761
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-761 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-761.txt')
!
test_K_SeqExprCast_762
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-762 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_763
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-763 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-763.txt')
!
test_K_SeqExprCast_764
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-764 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:duration is allowed and should always succeed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:duration
ne
xs:duration("P1Y2M3DT10H30M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-764.txt')
!
test_K_SeqExprCast_765
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-765 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:duration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") castable as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-765.txt')
!
test_K_SeqExprCast_766
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-766 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:yearMonthDuration is allowed and should always succeed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:yearMonthDuration
ne
xs:yearMonthDuration("P1Y12M")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-766.txt')
!
test_K_SeqExprCast_767
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-767 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:yearMonthDuration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") castable as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-767.txt')
!
test_K_SeqExprCast_768
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-768 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:dayTimeDuration is allowed and should always succeed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:dayTimeDuration
eq
xs:dayTimeDuration("P3DT2H")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-768.txt')
!
test_K_SeqExprCast_769
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-769 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:dayTimeDuration as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") castable as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-769.txt')
!
test_K_SeqExprCast_77
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-77 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:double(6) instance of xs:double`. :)
(:*******************************************************:)
xs:double(6) instance of xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-77.txt')
!
test_K_SeqExprCast_770
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-770 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_771
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-771 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-771.txt')
!
test_K_SeqExprCast_772
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-772 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_773
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-773 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-773.txt')
!
test_K_SeqExprCast_774
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-774 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_775
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-775 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-775.txt')
!
test_K_SeqExprCast_776
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-776 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_777
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-777 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-777.txt')
!
test_K_SeqExprCast_778
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-778 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_779
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-779 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-779.txt')
!
test_K_SeqExprCast_78
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-78 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:double("INF")) eq "INF"`. :)
(:*******************************************************:)
xs:string(xs:double("INF")) eq "INF"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-78.txt')
!
test_K_SeqExprCast_780
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-780 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_781
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-781 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-781.txt')
!
test_K_SeqExprCast_782
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-782 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_783
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-783 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-783.txt')
!
test_K_SeqExprCast_784
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-784 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_785
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-785 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-785.txt')
!
test_K_SeqExprCast_786
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-786 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_787
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-787 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-787.txt')
!
test_K_SeqExprCast_788
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-788 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_789
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-789 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-789.txt')
!
test_K_SeqExprCast_79
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-79 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:double("-INF")) eq "-INF"`. :)
(:*******************************************************:)
xs:string(xs:double("-INF")) eq "-INF"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-79.txt')
!
test_K_SeqExprCast_790
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-790 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_791
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-791 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-791.txt')
!
test_K_SeqExprCast_792
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-792 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_793
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-793 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-793.txt')
!
test_K_SeqExprCast_794
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-794 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dayTimeDuration to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:dayTimeDuration("P3DT2H") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_795
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-795 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-795.txt')
!
test_K_SeqExprCast_796
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-796 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dayTimeDuration as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:dayTimeDuration("P3DT2H") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_797
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-797 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:dateTime constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:dateTime()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_798
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-798 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:dateTime constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:dateTime(
"2002-10-10T12:00:00-05:00"
,
"2002-10-10T12:00:00-05:00"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_799
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-799 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:dateTime constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:dateTime("2002-10-10T12:00:00-05:00")), 3, 1) instance of xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-799.txt')
!
test_K_SeqExprCast_8
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-8 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A prefix is used which isn"t declared. :)
(:*******************************************************:)
3 cast as prefixDoesNotExist:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_80
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-80 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:float(3) eq 3`. :)
(:*******************************************************:)
xs:float(3) eq 3
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-80.txt')
!
test_K_SeqExprCast_800
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-800 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:dateTime. :)
(:*******************************************************:)
xs:dateTime("
2002-10-10T12:00:00-05:00
")
eq
xs:dateTime("
2002-10-10T12:00:00-05:00
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-800.txt')
!
test_K_SeqExprCast_801
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-801 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:dateTime. :)
(:*******************************************************:)
xs:dateTime("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_802
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-802 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "2002-10-10T12:00:00-05:00" . :)
(:*******************************************************:)
xs:dateTime(xs:untypedAtomic(
"2002-10-10T12:00:00-05:00"
)) eq xs:dateTime("2002-10-10T12:00:00-05:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-802.txt')
!
test_K_SeqExprCast_803
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-803 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:dateTime, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:dateTime("2002-10-10T12:00:00-05:00"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_804
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-804 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-804.txt')
!
test_K_SeqExprCast_805
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-805 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-805.txt')
!
test_K_SeqExprCast_806
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-806 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-806.txt')
!
test_K_SeqExprCast_807
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-807 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-807.txt')
!
test_K_SeqExprCast_808
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-808 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_809
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-809 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-809.txt')
!
test_K_SeqExprCast_81
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-81 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:float(3.1) eq 3.1`. :)
(:*******************************************************:)
xs:float(3.1) eq 3.1
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-81.txt')
!
test_K_SeqExprCast_810
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-810 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_811
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-811 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-811.txt')
!
test_K_SeqExprCast_812
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-812 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_813
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-813 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-813.txt')
!
test_K_SeqExprCast_814
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-814 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_815
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-815 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-815.txt')
!
test_K_SeqExprCast_816
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-816 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_817
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-817 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-817.txt')
!
test_K_SeqExprCast_818
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-818 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_819
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-819 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-819.txt')
!
test_K_SeqExprCast_82
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-82 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:float(6) instance of xs:float`. :)
(:*******************************************************:)
xs:float(6) instance of xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-82.txt')
!
test_K_SeqExprCast_820
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-820 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_821
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-821 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-821.txt')
!
test_K_SeqExprCast_822
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-822 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:dateTime is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:dateTime
eq
xs:dateTime("2002-10-10T12:00:00-05:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-822.txt')
!
test_K_SeqExprCast_823
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-823 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:dateTime as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-823.txt')
!
test_K_SeqExprCast_824
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-824 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:time is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:time
ne
xs:time("03:20:00-05:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-824.txt')
!
test_K_SeqExprCast_825
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-825 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:time as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-825.txt')
!
test_K_SeqExprCast_826
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-826 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:date is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:date
ne
xs:date("2004-10-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-826.txt')
!
test_K_SeqExprCast_827
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-827 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:date as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-827.txt')
!
test_K_SeqExprCast_828
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-828 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:gYearMonth is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:gYearMonth
ne
xs:gYearMonth("1999-11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-828.txt')
!
test_K_SeqExprCast_829
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-829 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:gYearMonth as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-829.txt')
!
test_K_SeqExprCast_83
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-83 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:float("INF")) eq "INF"`. :)
(:*******************************************************:)
xs:string(xs:float("INF")) eq "INF"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-83.txt')
!
test_K_SeqExprCast_830
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-830 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:gYear is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:gYear
ne
xs:gYear("1999")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-830.txt')
!
test_K_SeqExprCast_831
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-831 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:gYear as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-831.txt')
!
test_K_SeqExprCast_832
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-832 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:gMonthDay is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:gMonthDay
ne
xs:gMonthDay("--11-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-832.txt')
!
test_K_SeqExprCast_833
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-833 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:gMonthDay as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-833.txt')
!
test_K_SeqExprCast_834
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-834 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:gDay is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:gDay
ne
xs:gDay("---03")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-834.txt')
!
test_K_SeqExprCast_835
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-835 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:gDay as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-835.txt')
!
test_K_SeqExprCast_836
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-836 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:gMonth is allowed and should always succeed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:gMonth
ne
xs:gMonth("--11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-836.txt')
!
test_K_SeqExprCast_837
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-837 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:gMonth as target type should always evaluate to true. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-837.txt')
!
test_K_SeqExprCast_838
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-838 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_839
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-839 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-839.txt')
!
test_K_SeqExprCast_84
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-84 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:float("-INF")) eq "-INF"`. :)
(:*******************************************************:)
xs:string(xs:float("-INF")) eq "-INF"
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-84.txt')
!
test_K_SeqExprCast_840
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-840 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_841
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-841 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-841.txt')
!
test_K_SeqExprCast_842
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-842 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_843
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-843 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-843.txt')
!
test_K_SeqExprCast_844
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-844 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_845
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-845 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-845.txt')
!
test_K_SeqExprCast_846
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-846 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:dateTime to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:dateTime("2002-10-10T12:00:00-05:00") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_847
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-847 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-847.txt')
!
test_K_SeqExprCast_848
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-848 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:dateTime as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:dateTime("2002-10-10T12:00:00-05:00") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_849
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-849 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:time constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:time()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_85
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-85 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:decimal(3) eq 3`. :)
(:*******************************************************:)
xs:decimal(3) eq 3
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-85.txt')
!
test_K_SeqExprCast_850
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-850 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:time constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:time(
"03:20:00-05:00"
,
"03:20:00-05:00"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_851
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-851 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:time constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:time("03:20:00-05:00")), 3, 1) instance of xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-851.txt')
!
test_K_SeqExprCast_852
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-852 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:time. :)
(:*******************************************************:)
xs:time("
03:20:00-05:00
")
eq
xs:time("
03:20:00-05:00
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-852.txt')
!
test_K_SeqExprCast_853
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-853 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:time. :)
(:*******************************************************:)
xs:time("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_854
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-854 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "03:20:00-05:00" . :)
(:*******************************************************:)
xs:time(xs:untypedAtomic(
"03:20:00-05:00"
)) eq xs:time("03:20:00-05:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-854.txt')
!
test_K_SeqExprCast_855
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-855 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:time, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:time("03:20:00-05:00"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_856
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-856 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-856.txt')
!
test_K_SeqExprCast_857
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-857 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-857.txt')
!
test_K_SeqExprCast_858
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-858 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-858.txt')
!
test_K_SeqExprCast_859
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-859 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-859.txt')
!
test_K_SeqExprCast_86
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-86 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:decimal(3.1) eq 3.1`. :)
(:*******************************************************:)
xs:decimal(3.1) eq 3.1
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-86.txt')
!
test_K_SeqExprCast_860
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-860 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_861
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-861 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-861.txt')
!
test_K_SeqExprCast_862
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-862 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_863
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-863 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-863.txt')
!
test_K_SeqExprCast_864
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-864 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_865
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-865 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-865.txt')
!
test_K_SeqExprCast_866
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-866 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_867
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-867 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-867.txt')
!
test_K_SeqExprCast_868
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-868 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_869
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-869 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-869.txt')
!
test_K_SeqExprCast_87
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-87 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:decimal(6) instance of xs:decimal`. :)
(:*******************************************************:)
xs:decimal(6) instance of xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-87.txt')
!
test_K_SeqExprCast_870
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-870 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_871
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-871 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-871.txt')
!
test_K_SeqExprCast_872
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-872 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_873
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-873 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-873.txt')
!
test_K_SeqExprCast_874
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-874 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_875
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-875 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-875.txt')
!
test_K_SeqExprCast_876
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-876 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:time is allowed and should always succeed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:time
eq
xs:time("03:20:00-05:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-876.txt')
!
test_K_SeqExprCast_877
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-877 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:time as target type should always evaluate to true. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") castable as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-877.txt')
!
test_K_SeqExprCast_878
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-878 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_879
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-879 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-879.txt')
!
test_K_SeqExprCast_88
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-88 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:integer(3) eq 3`. :)
(:*******************************************************:)
xs:integer(3) eq 3
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-88.txt')
!
test_K_SeqExprCast_880
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-880 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:gYearMonth isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_881
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-881 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:gYearMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:gYearMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-881.txt')
!
test_K_SeqExprCast_882
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-882 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_883
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-883 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-883.txt')
!
test_K_SeqExprCast_884
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-884 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_885
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-885 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-885.txt')
!
test_K_SeqExprCast_886
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-886 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_887
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-887 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-887.txt')
!
test_K_SeqExprCast_888
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-888 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_889
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-889 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-889.txt')
!
test_K_SeqExprCast_89
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-89 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:integer(3.1) eq 3`. :)
(:*******************************************************:)
xs:integer(3.1) eq 3
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-89.txt')
!
test_K_SeqExprCast_890
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-890 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_891
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-891 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-891.txt')
!
test_K_SeqExprCast_892
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-892 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_893
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-893 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-893.txt')
!
test_K_SeqExprCast_894
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-894 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_895
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-895 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-895.txt')
!
test_K_SeqExprCast_896
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-896 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_897
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-897 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-897.txt')
!
test_K_SeqExprCast_898
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-898 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:time to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:time("03:20:00-05:00") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_899
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-899 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-899.txt')
!
test_K_SeqExprCast_9
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-9 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A type is specified which doesn"t exist. :)
(:*******************************************************:)
3 cast as xs:doesNotExist
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_90
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-90 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: Test that when casting xs:decimal to xs:integer that conversion happens. :)
(:*******************************************************:)
xs:integer(3.1) eq 3
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-90.txt')
!
test_K_SeqExprCast_900
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-900 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:time as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_901
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-901 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:date constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:date()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_902
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-902 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:date constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:date(
"2004-10-13"
,
"2004-10-13"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_903
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-903 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:date constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:date("2004-10-13")), 3, 1) instance of xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-903.txt')
!
test_K_SeqExprCast_904
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-904 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:date. :)
(:*******************************************************:)
xs:date("
2004-10-13
")
eq
xs:date("
2004-10-13
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-904.txt')
!
test_K_SeqExprCast_905
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-905 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:date. :)
(:*******************************************************:)
xs:date("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_906
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-906 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "2004-10-13" . :)
(:*******************************************************:)
xs:date(xs:untypedAtomic(
"2004-10-13"
)) eq xs:date("2004-10-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-906.txt')
!
test_K_SeqExprCast_907
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-907 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:date, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:date("2004-10-13"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_908
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-908 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-908.txt')
!
test_K_SeqExprCast_909
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-909 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-909.txt')
!
test_K_SeqExprCast_91
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-91 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:integer(6) instance of xs:integer`. :)
(:*******************************************************:)
xs:integer(6) instance of xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-91.txt')
!
test_K_SeqExprCast_910
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-910 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-910.txt')
!
test_K_SeqExprCast_911
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-911 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-911.txt')
!
test_K_SeqExprCast_912
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-912 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_913
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-913 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-913.txt')
!
test_K_SeqExprCast_914
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-914 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_915
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-915 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-915.txt')
!
test_K_SeqExprCast_916
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-916 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_917
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-917 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-917.txt')
!
test_K_SeqExprCast_918
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-918 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_919
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-919 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-919.txt')
!
test_K_SeqExprCast_92
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-92 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:integer(6) instance of xs:decimal`. :)
(:*******************************************************:)
xs:integer(6) instance of xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-92.txt')
!
test_K_SeqExprCast_920
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-920 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_921
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-921 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-921.txt')
!
test_K_SeqExprCast_922
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-922 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_923
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-923 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-923.txt')
!
test_K_SeqExprCast_924
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-924 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_925
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-925 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-925.txt')
!
test_K_SeqExprCast_926
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-926 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:dateTime is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:dateTime
ne
xs:dateTime("2002-10-10T12:00:00-05:00")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-926.txt')
!
test_K_SeqExprCast_927
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-927 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:dateTime as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-927.txt')
!
test_K_SeqExprCast_928
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-928 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_929
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-929 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-929.txt')
!
test_K_SeqExprCast_93
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-93 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:hexBinary("FFF")`. :)
(:*******************************************************:)
xs:hexBinary("FFF")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_930
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-930 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:date is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:date
eq
xs:date("2004-10-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-930.txt')
!
test_K_SeqExprCast_931
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-931 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:date as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-931.txt')
!
test_K_SeqExprCast_932
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-932 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:gYearMonth is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:gYearMonth
ne
xs:gYearMonth("1999-11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-932.txt')
!
test_K_SeqExprCast_933
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-933 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:gYearMonth as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-933.txt')
!
test_K_SeqExprCast_934
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-934 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:gYear is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:gYear
ne
xs:gYear("1999")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-934.txt')
!
test_K_SeqExprCast_935
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-935 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:gYear as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-935.txt')
!
test_K_SeqExprCast_936
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-936 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:gMonthDay is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:gMonthDay
ne
xs:gMonthDay("--11-13")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-936.txt')
!
test_K_SeqExprCast_937
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-937 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:gMonthDay as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-937.txt')
!
test_K_SeqExprCast_938
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-938 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:gDay is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:gDay
ne
xs:gDay("---03")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-938.txt')
!
test_K_SeqExprCast_939
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-939 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:gDay as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-939.txt')
!
test_K_SeqExprCast_94
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-94 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:hexBinary("FFxF")`. :)
(:*******************************************************:)
xs:hexBinary("FFxF")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_940
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-940 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:gMonth is allowed and should always succeed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:gMonth
ne
xs:gMonth("--11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-940.txt')
!
test_K_SeqExprCast_941
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-941 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:gMonth as target type should always evaluate to true. :)
(:*******************************************************:)
xs:date("2004-10-13") castable as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-941.txt')
!
test_K_SeqExprCast_942
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-942 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_943
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-943 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-943.txt')
!
test_K_SeqExprCast_944
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-944 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_945
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-945 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-945.txt')
!
test_K_SeqExprCast_946
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-946 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_947
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-947 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-947.txt')
!
test_K_SeqExprCast_948
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-948 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:anyURI isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:anyURI
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_949
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-949 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:anyURI as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:anyURI)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-949.txt')
!
test_K_SeqExprCast_95
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-95 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:hexBinary("0xFF")`. :)
(:*******************************************************:)
xs:hexBinary("0xFF")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_950
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-950 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:date to xs:QName isn"t allowed. :)
(:*******************************************************:)
xs:date("2004-10-13") cast as xs:QName
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_951
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-951 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as source type and xs:QName as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:QName)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-951.txt')
!
test_K_SeqExprCast_952
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-952 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:date as sourceType and xs:NOTATION should fail due to it involving xs:NOTATION. :)
(:*******************************************************:)
not(xs:date("2004-10-13") castable as xs:NOTATION)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_953
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-953 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gYearMonth constructor function must be passed exactly one argument, not zero. :)
(:*******************************************************:)
xs:gYearMonth()
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_954
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-954 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: The xs:gYearMonth constructor function must be passed exactly one argument, not two. :)
(:*******************************************************:)
xs:gYearMonth(
"1999-11"
,
"1999-11"
)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_955
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-955 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Verify with "instance of" that the xs:gYearMonth constructor function produces values of the correct type. The subsequence() function makes it more difficult for optimizers to take short cuts based on static type information. :)
(:*******************************************************:)
subsequence(("dummy", 1.1, xs:gYearMonth("1999-11")), 3, 1) instance of xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-955.txt')
!
test_K_SeqExprCast_956
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-956 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: A simple test exercising the whitespace facet for type xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("
1999-11
")
eq
xs:gYearMonth("
1999-11
")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-956.txt')
!
test_K_SeqExprCast_957
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-957 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: An empty string is not a valid lexical representation of xs:gYearMonth. :)
(:*******************************************************:)
xs:gYearMonth("")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_958
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-958 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Cast a simple xs:untypedAtomic value to "1999-11" . :)
(:*******************************************************:)
xs:gYearMonth(xs:untypedAtomic(
"1999-11"
)) eq xs:gYearMonth("1999-11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-958.txt')
!
test_K_SeqExprCast_959
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-959 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: It is not possible to extract an Effective Boolean Value from the type xs:gYearMonth, with the boolean() function. :)
(:*******************************************************:)
boolean(xs:gYearMonth("1999-11"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_96
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-96 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:hexBinary("F")`. :)
(:*******************************************************:)
xs:hexBinary("F")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_960
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-960 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:untypedAtomic is allowed and should always succeed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:untypedAtomic
ne
xs:untypedAtomic("an arbitrary string(untypedAtomic source)")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-960.txt')
!
test_K_SeqExprCast_961
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-961 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:untypedAtomic as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") castable as xs:untypedAtomic
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-961.txt')
!
test_K_SeqExprCast_962
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-962 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:string is allowed and should always succeed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:string
ne
xs:string("an arbitrary string")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-962.txt')
!
test_K_SeqExprCast_963
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-963 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:string as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") castable as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-963.txt')
!
test_K_SeqExprCast_964
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-964 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:float isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_965
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-965 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:float as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:float)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-965.txt')
!
test_K_SeqExprCast_966
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-966 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:double isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_967
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-967 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:double as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:double)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-967.txt')
!
test_K_SeqExprCast_968
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-968 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:decimal isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_969
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-969 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:decimal)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-969.txt')
!
test_K_SeqExprCast_97
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-97 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:hexBinary("x")`. :)
(:*******************************************************:)
xs:hexBinary("x")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_970
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-970 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:integer isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_971
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-971 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:integer as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:integer)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-971.txt')
!
test_K_SeqExprCast_972
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-972 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:duration isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:duration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_973
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-973 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:duration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:duration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-973.txt')
!
test_K_SeqExprCast_974
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-974 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:yearMonthDuration isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:yearMonthDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_975
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-975 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:yearMonthDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:yearMonthDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-975.txt')
!
test_K_SeqExprCast_976
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-976 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:dayTimeDuration isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:dayTimeDuration
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_977
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-977 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:dayTimeDuration as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:dayTimeDuration)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-977.txt')
!
test_K_SeqExprCast_978
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-978 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:dateTime isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_979
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-979 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:dateTime as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:dateTime)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-979.txt')
!
test_K_SeqExprCast_98
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-98 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `exists(xs:hexBinary("Ab08bcFFAA08b6"))`. :)
(:*******************************************************:)
exists(xs:hexBinary("Ab08bcFFAA08b6"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-98.txt')
!
test_K_SeqExprCast_980
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-980 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:time isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_981
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-981 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:time as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:time)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-981.txt')
!
test_K_SeqExprCast_982
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-982 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:date isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_983
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-983 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:date as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:date)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-983.txt')
!
test_K_SeqExprCast_984
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-984 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:gYearMonth is allowed and should always succeed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:gYearMonth
eq
xs:gYearMonth("1999-11")
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-984.txt')
!
test_K_SeqExprCast_985
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-985 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:gYearMonth as target type should always evaluate to true. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") castable as xs:gYearMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-985.txt')
!
test_K_SeqExprCast_986
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-986 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:gYear isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:gYear
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_987
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-987 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:gYear as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:gYear)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-987.txt')
!
test_K_SeqExprCast_988
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-988 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:gMonthDay isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:gMonthDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_989
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-989 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:gMonthDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:gMonthDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-989.txt')
!
test_K_SeqExprCast_99
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-99 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `exists(xs:hexBinary("FF"))`. :)
(:*******************************************************:)
exists(xs:hexBinary("FF"))
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-99.txt')
!
test_K_SeqExprCast_990
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-990 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:gDay isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:gDay
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_991
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-991 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:gDay as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:gDay)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-991.txt')
!
test_K_SeqExprCast_992
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-992 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:gMonth isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:gMonth
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_993
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-993 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:gMonth as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:gMonth)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-993.txt')
!
test_K_SeqExprCast_994
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-994 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:boolean isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_995
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-995 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:boolean as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:boolean)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-995.txt')
!
test_K_SeqExprCast_996
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-996 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:base64Binary isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:base64Binary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_997
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-997 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:base64Binary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:base64Binary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-997.txt')
!
test_K_SeqExprCast_998
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-998 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: Casting from xs:gYearMonth to xs:hexBinary isn"t allowed. :)
(:*******************************************************:)
xs:gYearMonth("1999-11") cast as xs:hexBinary
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_K_SeqExprCast_999
| query result |
query := '
(:*******************************************************:)
(: Test: K-SeqExprCast-999 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: "castable as" involving xs:gYearMonth as source type and xs:hexBinary as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:gYearMonth("1999-11") castable as xs:hexBinary)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-999.txt')
!
test_casthc1
| query result |
query := '
(: Name: casthc1 :)
(: Description: Simple test for evaluation of a simple expression casted as xs:integer :)
(5 + 5) cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc1.txt')
!
test_casthc10
| query result |
query := '
(: Name: casthc10 :)
(: Description: Simple test for casting a float as a double:)
xs:float(2.1E3) cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc10.txt')
!
test_casthc11
| query result |
query := '
(: Name: casthc11 :)
(: Description: Simple test for casting a float as a boolean:)
xs:float(2.1E3) cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc11.txt')
!
test_casthc12
| query result |
query := '
(: Name: casthc12 :)
(: Description: Simple test for casting a double as a double :)
xs:double(1267.43233E12) cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc12.txt')
!
test_casthc13
| query result |
query := '
(: Name: casthc13 :)
(: Description: Simple test for casting a double as a string :)
xs:double(1267.43233E12) cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc13.txt')
!
test_casthc14
| query result |
query := '
(: Name: casthc14 :)
(: Description: Simple test for casting a double as a float :)
(xs:double(1267.43233E12) cast as xs:float) eq xs:float(1267.43233E12)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_casthc15
| query result |
query := '
(: Name: casthc15 :)
(: Description: Simple test for casting a double as a boolean :)
xs:double(1267.43233E12) cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc15.txt')
!
test_casthc16
| query result |
query := '
(: Name: casthc16 :)
(: Description: Simple test for casting a decimal as a string :)
xs:decimal(12678967.543233) cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc16.txt')
!
test_casthc17
| query result |
query := '
(: Name: casthc17 :)
(: Description: Simple test for casting a decimal as a float :)
xs:decimal(12678967.543233) cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc17.txt')
!
test_casthc18
| query result |
query := '
(: Name: casthc18 :)
(: Description: Simple test for casting a decimal as a double :)
xs:decimal(12678967.543233) cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc18.txt')
!
test_casthc19
| query result |
query := '
(: Name: casthc19 :)
(: Description: Simple test for casting a decimal as a decimal :)
xs:decimal(12678967.543233) cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc19.txt')
!
test_casthc2
| query result |
query := '
(: Name: casthc2 :)
(: Description: Simple test for evaluation of a simple expression casted as xs:float :)
(5 + 5) cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc2.txt')
!
test_casthc20
| query result |
query := '
(: Name: casthc20 :)
(: Description: Simple test for casting a decimal as a integer :)
xs:decimal(12678967.543233) cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc20.txt')
!
test_casthc21
| query result |
query := '
(: Name: casthc21 :)
(: Description: Simple test for casting a decimal as a boolean :)
xs:decimal(12678967.543233) cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc21.txt')
!
test_casthc22
| query result |
query := '
(: Name: casthc22 :)
(: Description: Simple test for casting an integer as a string :)
xs:integer(12678967543233) cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc22.txt')
!
test_casthc23
| query result |
query := '
(: Name: casthc23 :)
(: Description: Simple test for casting an integer as a float :)
(xs:integer(12678967543233) cast as xs:float) eq xs:float(12678967543233)
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/truevalue.txt')
!
test_casthc24
| query result |
query := '
(: Name: casthc24 :)
(: Description: Simple test for casting an integer as a double :)
xs:integer(12678967543233) cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc24.txt')
!
test_casthc25
| query result |
query := '
(: Name: casthc25 :)
(: Description: Simple test for casting an integer as a decimal :)
xs:integer(12678967543233) cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc25.txt')
!
test_casthc26
| query result |
query := '
(: Name: casthc26 :)
(: Description: Simple test for casting an integer as an integer :)
xs:integer(12678967543233) cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc26.txt')
!
test_casthc27
| query result |
query := '
(: Name: casthc27 :)
(: Description: Simple test for casting an integer as a boolean :)
xs:integer(12678967543233) cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc27.txt')
!
test_casthc28
| query result |
query := '
(: Name: casthc28 :)
(: Description: Simple test for casting an dateTime as a string :)
xs:dateTime("1999-05-31T13:20:00-05:00") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc28.txt')
!
test_casthc29
| query result |
query := '
(: Name: casthc29 :)
(: Description: Simple test for casting an dateTime as a dateTime :)
xs:dateTime("1999-05-31T13:20:00-05:00") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc29.txt')
!
test_casthc3
| query result |
query := '
(: Name: casthc3 :)
(: Description: Simple test for evaluation of a simple expression casted as xs:boolean :)
(5 + 5) cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc3.txt')
!
test_casthc30
| query result |
query := '
(: Name: casthc30 :)
(: Description: Simple test for casting an dateTime as a time :)
xs:dateTime("1999-05-31T13:20:00-05:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc30.txt')
!
test_casthc31
| query result |
query := '
(: Name: casthc31 :)
(: Description: Simple test for casting an dateTime as a date :)
xs:dateTime("1999-05-31T13:20:00-05:00") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc31.txt')
!
test_casthc32
| query result |
query := '
(: Name: casthc32 :)
(: Description: Simple test for casting an date as a string :)
xs:date("1999-05-31") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc32.txt')
!
test_casthc33
| query result |
query := '
(: Name: casthc33 :)
(: Description: Simple test for casting an date as a dateTime :)
xs:date("1999-05-31") cast as xs:dateTime
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc33.txt')
!
test_casthc34
| query result |
query := '
(: Name: casthc34 :)
(: Description: Simple test for casting an date as a date :)
xs:date("1999-05-31") cast as xs:date
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc34.txt')
!
test_casthc35
| query result |
query := '
(: Name: casthc35 :)
(: Description: Simple test for casting an xs:time as a string :)
xs:time("12:00:00") cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc35.txt')
!
test_casthc36
| query result |
query := '
(: Name: casthc36 :)
(: Description: Simple test for casting an xs:time as an xs:time :)
xs:time("12:00:00") cast as xs:time
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc36.txt')
!
test_casthc37
| query result |
query := '
(: Name: casthc37 :)
(: Description: Simple test for casting a boolean as string :)
fn:true() cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc37.txt')
!
test_casthc38
| query result |
query := '
(: Name: casthc38 :)
(: Description: Simple test for casting a boolean as float :)
fn:true() cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc38.txt')
!
test_casthc39
| query result |
query := '
(: Name: casthc39 :)
(: Description: Simple test for casting a boolean as double :)
fn:true() cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc39.txt')
!
test_casthc4
| query result |
query := '
(: Name: casthc4 :)
(: Description: Simple test for evaluation of a simple expression casted as xs:double :)
(5 + 5) cast as xs:double
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc4.txt')
!
test_casthc40
| query result |
query := '
(: Name: casthc40 :)
(: Description: Simple test for casting a boolean as decimal :)
fn:true() cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc40.txt')
!
test_casthc41
| query result |
query := '
(: Name: casthc41 :)
(: Description: Simple test for casting a boolean as integer :)
fn:true() cast as xs:integer
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc41.txt')
!
test_casthc42
| query result |
query := '
(: Name: casthc42 :)
(: Description: Simple test for casting a boolean as boolean :)
fn:true() cast as xs:boolean
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc42.txt')
!
test_casthc43
| query result |
query := '
(: Name: casthc43 :)
(: Description: casting a string into an xs:NOTATION:)
xs:string("A String") cast as xs:NOTATION
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
self shouldRaiseError: [interpreter evaluate: query].
!
test_casthc5
| query result |
query := '
(: Name: casthc5 :)
(: Description: Simple test for evaluation of a simple expression casted as xs:decimal :)
(5 + 5) cast as xs:decimal
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc5.txt')
!
test_casthc6
| query result |
query := '
(: Name: casthc6 :)
(: Description: Simple test for evaluation of a simple expression casted as xs:string :)
(5 + 5) cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc6.txt')
!
test_casthc7
| query result |
query := '
(: Name: casthc7 :)
(: Description: Simple test for evaluation a string casted as xs:string :)
"A String" cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc7.txt')
!
test_casthc8
| query result |
query := '
(: Name: casthc8 :)
(: Description: Simple test for casting a float as a float :)
xs:float(2.1E3) cast as xs:float
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc8.txt')
!
test_casthc9
| query result |
query := '
(: Name: casthc9 :)
(: Description: Simple test for casting a float as a string :)
xs:float(2.1E3) cast as xs:string
'.
self xqtsBind: 'input-context' toContentsOf: 'emptydoc'.
result := interpreter evaluate: query.
self
assert: (self xqtsResultTextFromResult: result)
= (self xqtsResultTextFromFile:
'Expressions/exprSeqTypes/SeqExprCast/casthc9.txt')
! !
!XQTSSeqExprCastTests class methodsFor:'documentation'!
version_SVN
^ '$Id$'
! !