packages feed

rpc 0.0.0 → 0.0.1

raw patch · 4 files changed

+2/−52 lines, 4 files

Files

rpc.cabal view
@@ -1,5 +1,5 @@ name:                rpc-version:             0.0.0+version:             0.0.1 synopsis:            type safe rpcs provided as basic IO actions description:         Given an address of a server sharing a set of functions,                      this rpc library generates functions of the same name for@@ -15,3 +15,4 @@ build-type:          Simple build-depends:       base >= 3 && < 5, network-fancy < 1, cereal < 1, th-lift < 1, derive < 3, bytestring < 1, template-haskell < 3, containers < 1 exposed-modules:     Data.Serialize.Send, Network.RPC.Client, Network.RPC.Server+other-modules:       Network.RPC.Types
− tests/ctest.hs
@@ -1,24 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}--module Main where-import Network.RPC.Client-import Test.HUnit--$(fetch (IP "" 9000))--main = runTestTT $ TestList [-            TestLabel "hello world" hWorld,-            TestLabel "plusOne" plusTest,-            TestLabel "BoolInt" boolTest]--hWorld = TestCase $ do-    a <- helloWorld-    assertEqual "" "hello world" a--plusTest = TestCase $ do-    a <- tester 1-    assertEqual "Plus 1: " 2 a--boolTest = TestCase $ do-    a <- tester2 0 True-    assertEqual "Not True : " False a
− tests/stest.hs
@@ -1,15 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}--module Main where-import Network.RPC.Server--tester :: Int -> Int-tester = (+1)--helloWorld :: String-helloWorld = "hello world"--tester2 :: Int -> Bool -> Bool-tester2 _ = not--main = $(share 9000 [ 'tester, 'tester2, 'helloWorld ])
− tests/test.hs
@@ -1,12 +0,0 @@-module Main where-import System.Process-import Control.Concurrent--main = do-    c <- runCommand "ghc ./tests/stest.hs --make -o server"-    waitForProcess c-    s <- runCommand "./server"-    threadDelay 1000000-    p <- runCommand "runhaskell ./tests/ctest.hs"-    waitForProcess p-    terminateProcess s