Thanks to visit codestin.com
Credit goes to github.com

Skip to content

clojure.test/are tabular layout for supplied parameters #339

@chrischambers

Description

@chrischambers

Hey Kim,

I'd like the clojure.test/are macro to layout in a tabular way for the provided params, and I would guess that most people who employ it for their example-based testing would want something similar so that the arguments visually line up.

For example, the current format (with community style settings, :justified and :respect-nl) is:

(are [v k expected] (= expected (max-sum-subvector v k))
 [] 3 nil
 [1 2 3 4 5] 200 15
 [4 2 1 7 8 1 2 8 1 0] 3 16)

Ideally, I'd like it to be:

(are [v k expected]
     (= expected (max-sum-subvector v k))
 []                     3    nil
 [1 2 3 4 5]            200  15
 [4 2 1 7 8 1 2 8 1 0]  3    16)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions