From da3a1958edc6c777e05a5fabe2ffb1bdbe0f5dba Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Thu, 12 Jan 2012 17:54:03 +0100 Subject: Add tests for warnings --- tests/html-tests/tests/DeprecatedClass.hs | 15 ++ tests/html-tests/tests/DeprecatedClass.html.ref | 157 +++++++++++++++++ tests/html-tests/tests/DeprecatedData.hs | 15 ++ tests/html-tests/tests/DeprecatedData.html.ref | 192 +++++++++++++++++++++ tests/html-tests/tests/DeprecatedFunction.hs | 6 + tests/html-tests/tests/DeprecatedFunction.html.ref | 86 +++++++++ tests/html-tests/tests/DeprecatedFunction2.hs | 6 + .../html-tests/tests/DeprecatedFunction2.html.ref | 83 +++++++++ tests/html-tests/tests/DeprecatedFunction3.hs | 6 + .../html-tests/tests/DeprecatedFunction3.html.ref | 83 +++++++++ tests/html-tests/tests/DeprecatedNewtype.hs | 10 ++ tests/html-tests/tests/DeprecatedNewtype.html.ref | 157 +++++++++++++++++ tests/html-tests/tests/DeprecatedTypeFamily.hs | 9 + .../html-tests/tests/DeprecatedTypeFamily.html.ref | 106 ++++++++++++ tests/html-tests/tests/DeprecatedTypeSynonym.hs | 9 + .../tests/DeprecatedTypeSynonym.html.ref | 114 ++++++++++++ .../html-tests/tests/mini_DeprecatedClass.html.ref | 41 +++++ .../html-tests/tests/mini_DeprecatedData.html.ref | 41 +++++ .../tests/mini_DeprecatedFunction.html.ref | 31 ++++ .../tests/mini_DeprecatedFunction2.html.ref | 31 ++++ .../tests/mini_DeprecatedFunction3.html.ref | 31 ++++ .../tests/mini_DeprecatedNewtype.html.ref | 41 +++++ .../tests/mini_DeprecatedTypeFamily.html.ref | 41 +++++ .../tests/mini_DeprecatedTypeSynonym.html.ref | 41 +++++ 24 files changed, 1352 insertions(+) create mode 100644 tests/html-tests/tests/DeprecatedClass.hs create mode 100644 tests/html-tests/tests/DeprecatedClass.html.ref create mode 100644 tests/html-tests/tests/DeprecatedData.hs create mode 100644 tests/html-tests/tests/DeprecatedData.html.ref create mode 100644 tests/html-tests/tests/DeprecatedFunction.hs create mode 100644 tests/html-tests/tests/DeprecatedFunction.html.ref create mode 100644 tests/html-tests/tests/DeprecatedFunction2.hs create mode 100644 tests/html-tests/tests/DeprecatedFunction2.html.ref create mode 100644 tests/html-tests/tests/DeprecatedFunction3.hs create mode 100644 tests/html-tests/tests/DeprecatedFunction3.html.ref create mode 100644 tests/html-tests/tests/DeprecatedNewtype.hs create mode 100644 tests/html-tests/tests/DeprecatedNewtype.html.ref create mode 100644 tests/html-tests/tests/DeprecatedTypeFamily.hs create mode 100644 tests/html-tests/tests/DeprecatedTypeFamily.html.ref create mode 100644 tests/html-tests/tests/DeprecatedTypeSynonym.hs create mode 100644 tests/html-tests/tests/DeprecatedTypeSynonym.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedClass.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedData.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedFunction.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedFunction2.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedFunction3.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedNewtype.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref create mode 100644 tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref diff --git a/tests/html-tests/tests/DeprecatedClass.hs b/tests/html-tests/tests/DeprecatedClass.hs new file mode 100644 index 00000000..018904ab --- /dev/null +++ b/tests/html-tests/tests/DeprecatedClass.hs @@ -0,0 +1,15 @@ +module DeprecatedClass where + +-- | some class +class SomeClass a where + -- | documentation for foo + foo :: a -> a + +{-# DEPRECATED SomeClass "SomeClass" #-} +{-# DEPRECATED foo "foo" #-} + +class SomeOtherClass a where + bar :: a -> a + +{-# DEPRECATED SomeOtherClass "SomeOtherClass" #-} +{-# DEPRECATED bar "bar" #-} diff --git a/tests/html-tests/tests/DeprecatedClass.html.ref b/tests/html-tests/tests/DeprecatedClass.html.ref new file mode 100644 index 00000000..578e8bfb --- /dev/null +++ b/tests/html-tests/tests/DeprecatedClass.html.ref @@ -0,0 +1,157 @@ + +DeprecatedClass

 

Safe HaskellNone

DeprecatedClass

Synopsis

Documentation

class SomeClass a where

Deprecated: SomeClass

some class +

Methods

foo :: a -> a

Deprecated: foo

documentation for foo +

class SomeOtherClass a where

Deprecated: SomeOtherClass

Methods

bar :: a -> a

Deprecated: bar

diff --git a/tests/html-tests/tests/DeprecatedData.hs b/tests/html-tests/tests/DeprecatedData.hs new file mode 100644 index 00000000..c40ba122 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedData.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeFamilies #-} +module DeprecatedData where + +-- | type Foo +data Foo = Foo -- ^ constructor Foo + | Bar -- ^ constructor Bar + +{-# DEPRECATED Foo "Foo" #-} +{-# DEPRECATED Bar "Bar" #-} + +data One = One + | Two + +{-# DEPRECATED One "One" #-} +{-# DEPRECATED Two "Two" #-} diff --git a/tests/html-tests/tests/DeprecatedData.html.ref b/tests/html-tests/tests/DeprecatedData.html.ref new file mode 100644 index 00000000..06cc73dc --- /dev/null +++ b/tests/html-tests/tests/DeprecatedData.html.ref @@ -0,0 +1,192 @@ + +DeprecatedData

 

Safe HaskellNone

DeprecatedData

Synopsis

Documentation

data Foo

Deprecated: Foo

type Foo +

Constructors

Foo

Deprecated: Foo

constructor Foo +

Bar

Deprecated: Bar

constructor Bar +

data One

Deprecated: One

Constructors

One

Deprecated: One

Two

Deprecated: Two

diff --git a/tests/html-tests/tests/DeprecatedFunction.hs b/tests/html-tests/tests/DeprecatedFunction.hs new file mode 100644 index 00000000..55416369 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedFunction.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction where + +-- | some documentation foo +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/tests/html-tests/tests/DeprecatedFunction.html.ref b/tests/html-tests/tests/DeprecatedFunction.html.ref new file mode 100644 index 00000000..25e1863c --- /dev/null +++ b/tests/html-tests/tests/DeprecatedFunction.html.ref @@ -0,0 +1,86 @@ + +DeprecatedFunction

 

Safe HaskellNone

DeprecatedFunction

Synopsis

Documentation

foo :: Int

Deprecated: use bar instead

some documentation foo +

diff --git a/tests/html-tests/tests/DeprecatedFunction2.hs b/tests/html-tests/tests/DeprecatedFunction2.hs new file mode 100644 index 00000000..bdbbf95c --- /dev/null +++ b/tests/html-tests/tests/DeprecatedFunction2.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction2 where + + +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/tests/html-tests/tests/DeprecatedFunction2.html.ref b/tests/html-tests/tests/DeprecatedFunction2.html.ref new file mode 100644 index 00000000..ffc69f83 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedFunction2.html.ref @@ -0,0 +1,83 @@ + +DeprecatedFunction2

 

Safe HaskellNone

DeprecatedFunction2

Synopsis

Documentation

foo :: Int

Deprecated: use bar instead

diff --git a/tests/html-tests/tests/DeprecatedFunction3.hs b/tests/html-tests/tests/DeprecatedFunction3.hs new file mode 100644 index 00000000..ca719bda --- /dev/null +++ b/tests/html-tests/tests/DeprecatedFunction3.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction3 where + + + +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/tests/html-tests/tests/DeprecatedFunction3.html.ref b/tests/html-tests/tests/DeprecatedFunction3.html.ref new file mode 100644 index 00000000..246c3c69 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedFunction3.html.ref @@ -0,0 +1,83 @@ + +DeprecatedFunction3

 

Safe HaskellNone

DeprecatedFunction3

Synopsis

Documentation

foo :: Integer

Deprecated: use bar instead

diff --git a/tests/html-tests/tests/DeprecatedNewtype.hs b/tests/html-tests/tests/DeprecatedNewtype.hs new file mode 100644 index 00000000..254f1f55 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedNewtype.hs @@ -0,0 +1,10 @@ +module DeprecatedNewtype where + +-- | some documentation +newtype SomeNewType = SomeNewTypeConst String {- ^ constructor docu -} +{-# DEPRECATED SomeNewType "SomeNewType" #-} +{-# DEPRECATED SomeNewTypeConst "SomeNewTypeConst" #-} + +newtype SomeOtherNewType = SomeOtherNewTypeConst String +{-# DEPRECATED SomeOtherNewType "SomeOtherNewType" #-} +{-# DEPRECATED SomeOtherNewTypeConst "SomeOtherNewTypeConst" #-} diff --git a/tests/html-tests/tests/DeprecatedNewtype.html.ref b/tests/html-tests/tests/DeprecatedNewtype.html.ref new file mode 100644 index 00000000..ce19efa2 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedNewtype.html.ref @@ -0,0 +1,157 @@ + +DeprecatedNewtype

 

Safe HaskellNone

DeprecatedNewtype

Documentation

newtype SomeNewType

Deprecated: SomeNewType

some documentation +

Constructors

SomeNewTypeConst String

Deprecated: SomeNewTypeConst

constructor docu +

newtype SomeOtherNewType

Deprecated: SomeOtherNewType

Constructors

SomeOtherNewTypeConst String

Deprecated: SomeOtherNewTypeConst

diff --git a/tests/html-tests/tests/DeprecatedTypeFamily.hs b/tests/html-tests/tests/DeprecatedTypeFamily.hs new file mode 100644 index 00000000..70473bb8 --- /dev/null +++ b/tests/html-tests/tests/DeprecatedTypeFamily.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module DeprecatedTypeFamily where + +-- | some documentation +data family SomeTypeFamily k :: * -> * +{-# DEPRECATED SomeTypeFamily "SomeTypeFamily" #-} + +data family SomeOtherTypeFamily k :: * -> * +{-# DEPRECATED SomeOtherTypeFamily "SomeOtherTypeFamily" #-} diff --git a/tests/html-tests/tests/DeprecatedTypeFamily.html.ref b/tests/html-tests/tests/DeprecatedTypeFamily.html.ref new file mode 100644 index 00000000..182f2c9e --- /dev/null +++ b/tests/html-tests/tests/DeprecatedTypeFamily.html.ref @@ -0,0 +1,106 @@ + +DeprecatedTypeFamily

 

Safe HaskellNone

DeprecatedTypeFamily

Synopsis

Documentation

data family SomeTypeFamily k :: * -> *

Deprecated: SomeTypeFamily

some documentation +

data family SomeOtherTypeFamily k :: * -> *

Deprecated: SomeOtherTypeFamily

diff --git a/tests/html-tests/tests/DeprecatedTypeSynonym.hs b/tests/html-tests/tests/DeprecatedTypeSynonym.hs new file mode 100644 index 00000000..34df47da --- /dev/null +++ b/tests/html-tests/tests/DeprecatedTypeSynonym.hs @@ -0,0 +1,9 @@ + +module DeprecatedTypeSynonym where + +-- | some documentation +type TypeSyn = String +{-# DEPRECATED TypeSyn "TypeSyn" #-} + +type OtherTypeSyn = String +{-# DEPRECATED OtherTypeSyn "OtherTypeSyn" #-} diff --git a/tests/html-tests/tests/DeprecatedTypeSynonym.html.ref b/tests/html-tests/tests/DeprecatedTypeSynonym.html.ref new file mode 100644 index 00000000..a063d8ce --- /dev/null +++ b/tests/html-tests/tests/DeprecatedTypeSynonym.html.ref @@ -0,0 +1,114 @@ + +DeprecatedTypeSynonym

 

Safe HaskellNone

DeprecatedTypeSynonym

Synopsis

Documentation

type TypeSyn = String

Deprecated: TypeSyn

some documentation +

type OtherTypeSyn = String

Deprecated: OtherTypeSyn

diff --git a/tests/html-tests/tests/mini_DeprecatedClass.html.ref b/tests/html-tests/tests/mini_DeprecatedClass.html.ref new file mode 100644 index 00000000..3923c1ff --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedClass.html.ref @@ -0,0 +1,41 @@ + +DeprecatedClass

DeprecatedClass

class SomeClass a

diff --git a/tests/html-tests/tests/mini_DeprecatedData.html.ref b/tests/html-tests/tests/mini_DeprecatedData.html.ref new file mode 100644 index 00000000..8ef20113 --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedData.html.ref @@ -0,0 +1,41 @@ + +DeprecatedData

DeprecatedData

data Foo

data One

diff --git a/tests/html-tests/tests/mini_DeprecatedFunction.html.ref b/tests/html-tests/tests/mini_DeprecatedFunction.html.ref new file mode 100644 index 00000000..17d3e526 --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedFunction.html.ref @@ -0,0 +1,31 @@ + +DeprecatedFunction

DeprecatedFunction

diff --git a/tests/html-tests/tests/mini_DeprecatedFunction2.html.ref b/tests/html-tests/tests/mini_DeprecatedFunction2.html.ref new file mode 100644 index 00000000..a03991a9 --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedFunction2.html.ref @@ -0,0 +1,31 @@ + +DeprecatedFunction2

DeprecatedFunction2

diff --git a/tests/html-tests/tests/mini_DeprecatedFunction3.html.ref b/tests/html-tests/tests/mini_DeprecatedFunction3.html.ref new file mode 100644 index 00000000..4ea60339 --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedFunction3.html.ref @@ -0,0 +1,31 @@ + +DeprecatedFunction3

DeprecatedFunction3

diff --git a/tests/html-tests/tests/mini_DeprecatedNewtype.html.ref b/tests/html-tests/tests/mini_DeprecatedNewtype.html.ref new file mode 100644 index 00000000..a913525f --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedNewtype.html.ref @@ -0,0 +1,41 @@ + +DeprecatedNewtype

DeprecatedNewtype

diff --git a/tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref b/tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref new file mode 100644 index 00000000..c87d9637 --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedTypeFamily.html.ref @@ -0,0 +1,41 @@ + +DeprecatedTypeFamily

DeprecatedTypeFamily

data family SomeTypeFamily k :: * -> *

data family SomeOtherTypeFamily k :: * -> *

diff --git a/tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref b/tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref new file mode 100644 index 00000000..5ade100d --- /dev/null +++ b/tests/html-tests/tests/mini_DeprecatedTypeSynonym.html.ref @@ -0,0 +1,41 @@ + +DeprecatedTypeSynonym

DeprecatedTypeSynonym

type TypeSyn

-- cgit v1.2.3