mirror of
https://github.com/dart-lang/sdk
synced 2024-09-22 08:41:18 +00:00
- Update tests to make sure they recerefence invalid code.
- Improve multi test case configuration by adding a 'continued' tag. Review URL: http://codereview.chromium.org//8437091 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1153 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
c6aaab878a
commit
3dedc560f5
|
@ -7,32 +7,72 @@
|
|||
// implemented or extended.
|
||||
|
||||
// bool.
|
||||
class MyBool implements bool {} /// 01: compile-time error
|
||||
interface MyBoolInterface extends bool {} /// 02: compile-time error
|
||||
class MyBool implements bool {} /// 01: compile-time error
|
||||
interface MyBoolInterface extends bool factory F { /// 02: compile-time error
|
||||
MyBoolInterface(); /// 02: continued
|
||||
} /// 02: continued
|
||||
|
||||
// num.
|
||||
class MyNum implements num {} /// 03: compile-time error
|
||||
interface MyNumInterface extends num {} /// 04: compile-time error
|
||||
class MyNum implements num {} /// 03: compile-time error
|
||||
interface MyNumInterface extends num factory F { /// 04: compile-time error
|
||||
MyNumInterface(); /// 04: continued
|
||||
} /// 04: continued
|
||||
|
||||
// int.
|
||||
class MyInt implements int {} /// 05: compile-time error
|
||||
interface MyIntInterface extends int {} /// 06: compile-time error
|
||||
class MyInt implements int {} /// 05: compile-time error
|
||||
interface MyIntInterface extends int factory F { /// 06: compile-time error
|
||||
MyIntInterface(); /// 06: continued
|
||||
} /// 06: continued
|
||||
|
||||
// double.
|
||||
class MyDouble implements double {} /// 07: compile-time error
|
||||
interface MyDoubleInterface extends double {} /// 08: compile-time error
|
||||
class MyDouble implements double {} /// 07: compile-time error
|
||||
interface MyDoubleInterface extends double factory F { /// 08: compile-time error
|
||||
MyDoubleInterface(); /// 08: continued
|
||||
} /// 08: continued
|
||||
|
||||
// String.
|
||||
class MyString implements String {} /// 09: compile-time error
|
||||
interface MyStringInterface extends String {} /// 10: compile-time error
|
||||
class MyString implements String {} /// 09: compile-time error
|
||||
interface MyStringInterface extends String factory F { /// 10: compile-time error
|
||||
MyStringInterface(); /// 10: continued
|
||||
} /// 10: continued
|
||||
|
||||
// Function.
|
||||
class MyFunction implements Function {} /// 11: compile-time error
|
||||
interface MyFunctionInterface extends Function {} /// 12: compile-time error
|
||||
class MyFunction implements Function {} /// 11: compile-time error
|
||||
interface MyFunctionInterface extends Function factory F { /// 12: compile-time error
|
||||
MyFunctionInterface(); /// 12: continued
|
||||
} /// 12: continued
|
||||
|
||||
// Dynamic.
|
||||
class MyDynamic implements Dynamic {} /// 13: compile-time error
|
||||
interface MyDynamicInterface extends Dynamic {} /// 14: compile-time error
|
||||
class MyDynamic implements Dynamic {} /// 13: compile-time error
|
||||
interface MyDynamicInterface extends Dynamic factory F { /// 14: compile-time error
|
||||
MyDynamicInterface(); /// 14: continued
|
||||
} /// 14: continued
|
||||
|
||||
|
||||
class F {
|
||||
factory MyBoolInterface() { return null; } /// 02: continued
|
||||
factory MyNumInterface() { return null; } /// 04: continued
|
||||
factory MyIntInterface() { return null; } /// 06: continued
|
||||
factory MyDoubleInterface() { return null; } /// 08: continued
|
||||
factory MyStringInterface() { return null; } /// 10: continued
|
||||
factory MyFunctionInterface() { return null; } /// 12: continued
|
||||
factory MyDynamicInterface() { return null; } /// 14: continued
|
||||
}
|
||||
|
||||
|
||||
main() {
|
||||
}
|
||||
new MyBool(); /// 01: continued
|
||||
new MyBoolInterface(); /// 02: continued
|
||||
new MyNum(); /// 03: continued
|
||||
new MyNumInterface(); /// 04: continued
|
||||
new MyInt(); /// 05: continued
|
||||
new MyIntInterface(); /// 06: continued
|
||||
new MyDouble(); /// 07: continued
|
||||
new MyDoubleInterface(); /// 08: continued
|
||||
new MyString(); /// 09: continued
|
||||
new MyStringInterface(); /// 10: continued
|
||||
new MyFunction(); /// 11: continued
|
||||
new MyFunctionInterface(); /// 12: continued
|
||||
new MyDynamic(); /// 13: continued
|
||||
new MyDynamicInterface(); /// 14: continued
|
||||
}
|
||||
|
|
|
@ -13,4 +13,5 @@ class myClass extends lib12.Library13 {
|
|||
}
|
||||
|
||||
main() {
|
||||
new myClass(1);
|
||||
}
|
||||
|
|
|
@ -13,4 +13,5 @@ class myClass implements lib12.Library13 {
|
|||
}
|
||||
|
||||
main() {
|
||||
new myClass(1);
|
||||
}
|
||||
|
|
|
@ -168,10 +168,12 @@ class StandardTestConfiguration(test.TestConfiguration):
|
|||
if sep:
|
||||
(tag, sep, kind) = info.partition(': ')
|
||||
if tag in tags:
|
||||
raise TestConfigurationError('duplicated tag %s' % tag)
|
||||
if kind not in StandardTestConfiguration.LEGAL_KINDS:
|
||||
if kind != 'continued':
|
||||
raise TestConfigurationError('duplicated tag %s' % tag)
|
||||
elif kind not in StandardTestConfiguration.LEGAL_KINDS:
|
||||
raise TestConfigurationError('unrecognized kind %s' % kind)
|
||||
tags[tag] = kind
|
||||
else:
|
||||
tags[tag] = kind
|
||||
if not tags:
|
||||
return {}
|
||||
# Prepare directory for generated tests.
|
||||
|
|
Loading…
Reference in a new issue