From d7adab3dbda0fc2ebabc2374adf5fab3ecd790ef Mon Sep 17 00:00:00 2001 From: Roman Cheplyaka Date: Wed, 20 Jun 2012 14:08:04 +0300 Subject: Tests for hiding instances (#37) --- tests/html-tests/tests/HiddenInstances.hs | 35 +++++ tests/html-tests/tests/HiddenInstances.html.ref | 169 ++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 tests/html-tests/tests/HiddenInstances.hs create mode 100644 tests/html-tests/tests/HiddenInstances.html.ref (limited to 'tests') diff --git a/tests/html-tests/tests/HiddenInstances.hs b/tests/html-tests/tests/HiddenInstances.hs new file mode 100644 index 00000000..99a6c2fd --- /dev/null +++ b/tests/html-tests/tests/HiddenInstances.hs @@ -0,0 +1,35 @@ +-- http://trac.haskell.org/haddock/ticket/37 +module HiddenInstances (VisibleClass, VisibleData) where + +-- | Should be visible +class VisibleClass a + +-- | Should *not* be visible +class HiddenClass a + +-- | Should *not* be visible +data HiddenData = HiddenData + +-- | Should be visible +data VisibleData = VisibleData + +-- | Should be visible +instance VisibleClass Int + +-- | Should be visible +instance VisibleClass VisibleData + +-- | Should be visible +instance Num VisibleData + +-- | Should *not* be visible +instance VisibleClass HiddenData + +-- | Should *not* be visible +instance HiddenClass Int + +-- | Should *not* be visible +instance HiddenClass VisibleData + +-- | Should *not* be visible +instance HiddenClass HiddenData diff --git a/tests/html-tests/tests/HiddenInstances.html.ref b/tests/html-tests/tests/HiddenInstances.html.ref new file mode 100644 index 00000000..c1b75927 --- /dev/null +++ b/tests/html-tests/tests/HiddenInstances.html.ref @@ -0,0 +1,169 @@ + +HiddenInstances

 

Safe HaskellNone

HiddenInstances

Synopsis

Documentation

class VisibleClass a

Should be visible +

Instances

VisibleClass Int

Should be visible +

VisibleClass VisibleData

Should be visible +

data VisibleData

Should be visible +

Instances

Num VisibleData

Should be visible +

VisibleClass VisibleData

Should be visible +

-- cgit v1.2.3 From 8fe6416bcc1078540c21984cee7ef453dd9f1cfb Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 20 Jun 2012 15:42:35 +0200 Subject: Add an other test for hiding instances (#37) --- tests/html-tests/tests/HiddenInstancesA.hs | 17 +++ tests/html-tests/tests/HiddenInstancesB.hs | 2 + tests/html-tests/tests/HiddenInstancesB.html.ref | 143 +++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 tests/html-tests/tests/HiddenInstancesA.hs create mode 100644 tests/html-tests/tests/HiddenInstancesB.hs create mode 100644 tests/html-tests/tests/HiddenInstancesB.html.ref (limited to 'tests') diff --git a/tests/html-tests/tests/HiddenInstancesA.hs b/tests/html-tests/tests/HiddenInstancesA.hs new file mode 100644 index 00000000..f1775208 --- /dev/null +++ b/tests/html-tests/tests/HiddenInstancesA.hs @@ -0,0 +1,17 @@ +{-# OPTIONS_HADDOCK hide #-} +module HiddenInstancesA where + +-- | Should be visible +class Foo a + +-- | Should be visible +data Bar + +-- | Should be visible +instance Foo Bar + +-- | Should *not* be visible +data Baz + +-- | Should *not* be visible +instance Foo Baz diff --git a/tests/html-tests/tests/HiddenInstancesB.hs b/tests/html-tests/tests/HiddenInstancesB.hs new file mode 100644 index 00000000..eabf0637 --- /dev/null +++ b/tests/html-tests/tests/HiddenInstancesB.hs @@ -0,0 +1,2 @@ +module HiddenInstancesB (Foo, Bar) where +import HiddenInstancesA diff --git a/tests/html-tests/tests/HiddenInstancesB.html.ref b/tests/html-tests/tests/HiddenInstancesB.html.ref new file mode 100644 index 00000000..4d037bec --- /dev/null +++ b/tests/html-tests/tests/HiddenInstancesB.html.ref @@ -0,0 +1,143 @@ + +HiddenInstancesB
Safe HaskellNone

HiddenInstancesB

Synopsis

Documentation

class Foo a

Should be visible +

Instances

Foo Bar

Should be visible +

data Bar

Should be visible +

Instances

Foo Bar

Should be visible +

-- cgit v1.2.3