Permalink
Browse files

Added test files

  • Loading branch information...
1 parent 1ee8a95 commit dd28029a30e960f432d301fc46095b77a364d7a7 Omar Khan committed Oct 11, 2011
Showing with 76 additions and 0 deletions.
  1. +5 −0 test/lib/testmodule.coffee
  2. +10 −0 test/module.coffee
  3. +61 −0 test/test.coffee
@@ -0,0 +1,5 @@
+###
+#\#\# This is another module used by test.coffee
+###
+
+class exports.Lib
View
@@ -0,0 +1,10 @@
+###
+External module
+===============
+
+This is a module required by test.coffee
+###
+
+exports.BaseClass = class BaseClass
+ constructor: (name) ->
+ @name = name
View
@@ -0,0 +1,61 @@
+###
+CoffeeDoc test
+==============
+
+This file is designed to expose CoffeeDoc to various function and class
+declaration styles.
+###
+
+# Imports
+
+my_module = require(__dirname + '/module')
+lib = require('lib/testmodule')
+
+# Classes
+
+class MyClass
+ ###
+ This class does not inherit from another class
+ ###
+ constructor: ->
+ ### Initialise it! ###
+
+ myMethod: =>
+ ### Bound method of MyClass ###
+
+
+class Subclass extends MyClass
+ ###
+ This class inherits from MyClass
+ ###
+ @static = (args) ->
+ ### This is a static method ###
+
+ myMethod: (arg) =>
+ return arg + 1
+
+
+class EmptyClass extends MyClass
+
+
+class Subclass2 extends my_module.BaseClass
+ ###
+ This class inherits from a class in another module
+ ###
+ method: =>
+ ### A method ###
+
+class LibClass extends lib.Lib
+
+# Functions
+
+myFunc = (arg1, arg2) ->
+ ###
+ This is a top-level function, and will be documented
+ ###
+ return null
+
+myFunc2 = (arg, splat...) ->
+ ### Another function, with a splat argument ###
+ return splat[0] if splat.length > 0
+ return null

0 comments on commit dd28029

Please sign in to comment.