GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - smlsharp/SMLUnit: unit testing framework for StandardML and SML#

BranchesTags
Open more actions menu

Latest commit

 

History

100 Commits
100 Commits

Folders and files

NameName
Last commit message
Last commit date
basis
basis
 
 
example
example
 
 
script
script
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
Makefile.mlton
Makefile.mlton
 
 
Makefile.polyml
Makefile.polyml
 
 
Makefile.smlnj
Makefile.smlnj
 
 
README.txt
README.txt
 
 
export.sml
export.sml
 
 
readme.md
readme.md
 
 
smlunit-lib.cm
smlunit-lib.cm
 
 
smlunit-lib.mlb
smlunit-lib.mlb
 
 
smlunit-lib.smi
smlunit-lib.smi
 
 
smlunitlib.cm
smlunitlib.cm
 
 
smlunitlib.mlb
smlunitlib.mlb
 
 
smlunitlib.smi
smlunitlib.smi
 
 

Repository files navigation

SMLUnit: Unit Testing Framework for SML(#)

This is unofficial repository for SMLUnit.

If you get official information, see http://www.pllab.riec.tohoku.ac.jp/smlsharp/?SMLUnit .

What is not this

  • This is not official repository.
  • There is no relationship with SML# deveploment team or Tohoku University.

What is this

  • A general unit testing frame work for SML system(# is not required)
  • This is imported from SML#v3.6.0 unofficial repository (https://github.com/smlsharp/smlsharp/tree/v3.6.0)
  • This framework support SML#, SML/NJ, MLton and Poly/ML explicitly

Setup

SML#

Build object files with Make:

$ make
Makefile:56: Assert.d: No such file or directory
Makefile:56: SMLUnit.d: No such file or directory
Makefile:56: Test.d: No such file or directory
Makefile:56: TextUITestRunner.d: No such file or directory
 GEN [TextUITestRunner.d]
 GEN [Test.d]
 GEN [SMLUnit.d]
 GEN [Assert.d]
 SML# [Assert.o]
 SML# [SMLUnit.o]
 SML# [Test.o]
 SML# [TextUITestRunner.o]

then, you can use smlunit-lib from any other projects. For using from other project, refer to smlunit-lib.smi:

(* test_foo.smi *)
..
(* refer to this library *)
_require "smlunit-lib.smi"
..

Build the project with -I and -L flags.

$ smlsharp -I/path/to/smlunit -L/path/to/smlunit -o test_foo test_foo.smi

SML/NJ

Install

To install SMLUnit for SML/NJ, run make install with Makefile.smlnj:

$ make -f Makefile.smlnj install

Above command install SMLUnit to /usr/local/sml. This install location can be set with PREFIX variable like:

$ make -f Makefile.smlnj install PREFIX=~/.sml/smlnj/110.99

The install target uses SMLDoc to generate the documentations for SMLUnit. If you do not need to generate documentation, run the install-nodoc target.

$ make -f Makefile.smlnj install-nodoc

After running the install or install-nodoc target, add an entry for smlunit-lib.cm to the pathconfig file to complete the installation.

$ echo 'smlunit-lib.cm /usr/local/smlnj/lib/smlunit-lib.cm' >> ~/.smlnj-pathconfig

or

$ echo 'smlunit-lib.cm PREFIX/lib/smlunit-lib.cm' >> ~/.smlnj-pathconfig

Test

To run unit tests, run the test target:

$ make -f Makefile.smlnj test

Depending on the test case, it will fails.

Examples

To run the example program, run the example target:

$ make -f Makefile.smlnj example

MLton

Install

To install SMLUnit for MLton, run make install with Makefile.mlton:

$ make -f Makefile.mlton install

Above command install SMLUnit to /usr/local/mlton. This install location can be set with PREFIX variable like:

$ make -f Makefile.mlton PREFIX=~/.sml/mlton install

The install target uses SMLDoc to generate the documentations for SMLUnit. If you do not need to generate documentation, run the install-nodoc target.

$ make -f Makefile.mlton install-nodoc

After running the install target, add an entry for SMLUNIT_LIB to your mlb path mapping file to complete the installation.

$ echo 'SMLUNIT_LIB /path/to/$PREFIX' >> /path/to/mlb-path-map

For using SMLUnit, refer to $(SMLUNIT_LIB)/smlunit-lib.mlb from your MLB file.

$(SML_LIB)/basis/basis.mlb
$(SMLUNIT_LIB)/smlunit-lib.mlb
.
.

Test

To run unit tests, run the test target:

$ make -f Makefile.mlton test

Depending on the test case, it will fails.

Examples

To run the example program, run the example target:

$ make -f Makefile.smlnj example

PolyML

Install

To install SMLUnit for Poly/ML, run make install with Makefile.polyml.

$ make -f Makefile.polyml install

Above command install SMLUnit to /usr/local/polyml. This install location can be set with PREFIX variable like:

$ make -f Makefile.polyml PREFIX=~/.sml/polyml/5.8.1 install

The install target uses SMLDoc to generate the documentations for SMLUnit. If you do not need to generate documentation, run the install-nodoc target.

$ make -f Makefile.polyml install-nodoc

Then you will get smlunit-lib.poly in PREFIX/lib/smlunit-lib which is the collection of SMLUnit entities. It is possible to load directly into the REPL:

$ poly
> PolyML.loadModule "/path/to/smlunit-lib.poly";
signature ASSERT =
  sig
..
signature TESTRUNNER =
  sig type parameter val runTest: parameter -> Test.test -> unit end
val it = (): unit

Test

To run unit tests, run the test target:

$ make -f Makefile.polyml test

Depending on the test case, it will fails.

Examples

To run the example program, run the example target:

$ make -f Makefile.polyml example

About

unit testing framework for StandardML and SML#

Resources

Readme
BSD-3-Clause license
Activity
Custom properties

Stars

12 stars

Watchers

5 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.