Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-layout-tester

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-layout-tester

Tests cases for various tree layout algorithms

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

tree-layout-tester

Checks a tree layout produces results consistent with a known tree ordering

Install

npm install tree-layout-tester

Example

var layoutTester = require("tree-layout-tester")

//Your tree layout
var myLayout =  // ...  something

require("tap").test("my layout test", function(t) {

  var T = layoutTester.T
    , testTree = layoutTester.bind({}, t, myLayout)

  //Enforce that tree layout respects this ordering
  testTree(T(0, T(1), T(2))

  t.end()
})

API

require("tree-layout-tester").T(v, left, right)

Creates a tree with index v and the given left/right subtrees

require("tree-layout-tester")(tap, layout, root)

Tests the layout against the tree given by root. tap is a pointer to a tap object.

License

(c) 2013 Mikola Lysenko. MIT License

Keywords

FAQs

Package last updated on 24 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc