Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P project00
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cs24-20fa
  • project00
  • Merge requests
  • !3

Merged
Created Sep 09, 2020 by Caleb C. Sander@csanderMaintainer

Add directory tree tests

  • Overview 0
  • Commits 1
  • Pipelines 2
  • Changes 19

Removes the fake target and adds 5 tests of directory tree inserts:

  • ascending: files and subdirectories are added to each directory in ascending order
  • descending: files and subdirectories are added to each direction in descending order
  • example: the example tree from the spec (which was previously implemented by the fake test
  • lexicographic: a depth-1 tree whose filenames are all the sequences with lengths between 1 and 5 consisting of a, _, and 0. The files are inserted in random order.
  • random: inserts 1000 randomly generated paths with depths between 1 to 10; each file/subdirectory name is randomly generated with length between 1 and 4 consisting of x, y, and z

There is a bin/test_tree program that runs a given test's input file, uses print_directory_tree() to list the tree's entries, and create_directory_tree() to write the tree to disk. Both of these are compared with their expected versions.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/tests