Git Product home page Git Product logo

project1-tests's Introduction

Project 1 Tests

Test cases for UA CS101 Project 1.

Important Note about UA's Code of Academic Conduct

Under no circumstances should any of your project code be attached to any of the test cases you submit here. Code of any kind should not be posted in any of the issues, wiki, projects, or other parts of this repo. This is against UA's Code of Academic Conduct. All Academic Conduct violations will be reported to the appropriate authorities.

Again, just one last time so that we're clear: you should not include any code in any test cases, commits, pull requests, issues, wiki edits, issue comments, commit comments, etc. This repo is solely for test cases and output results; you are not allowed to discuss or share anything about how you acheived those results, only about the results themselves. Any content infringing this will be removed, and you will be reported to our professor and the Office of Academic Affairs.

I do not condone breaking the Code of Academic Conduct. The purpose of this repo is to help students verify their results, and not to condone, promote, or allow cheating or plagiarism. I am not responsible for any negative repercussions you may face if you break this policy.

What is this?

This is a Git repository for UA CS101 students to collaborate on test cases for Project 1. You can download and test any of the test cases here, and check the issues tab to find the expected results. If your results differ, you can post in the specific issue as well, and other students can help you fix the problem if possible.

You can also submit your own test cases along with expected results so that other people can verify it with their implementation. See below for how to do this.

Cool! How do I use this?

First, you'll need to install Git on your computer. Git is a version management system that allows you to keep a timeline of all of your file edits. Think of it like undo/redo, but for your codebase. If you accidentally save a change that you didn't mean to, you're able to undo it by reverting to a previous version. Here's how to install Git for your platform.

Next, you'll need to initialize a Git repository in your code base. To initialize a Git repository in your existing code base, run the following commands:

cd ~/path/to/your/project/folder
git init

After this, you'll want to commit all of your existing changes. See this link for more information about Git and how commits work.. To do this, run the following commands:

git add .
git commit -m "My first commit!"

Congratulations! You just made your first commit.

Finally, you'll want to add this git repository as a submodule to your current repository. All a submodule does is download a git repository into a subdirectory of your code. Run the following commands to add this repository as a submodule:

git submodule add https://github.com/samwightt/project1-tests tests

This command will download this git repository (samwightt/project1-tests) into a folder called tests in your project folder. Congratulations, you can now run the tests!

Great! How do I run the tests?

You'll have to run the tests indivdually and verify the results yourself. If you used the above commands, all the tests should be in a tests subdirectory underneath your project folder. Use a command like this to run them:

./project1 tests/test1.txt

How do I verify the results?

To verify the results of a test, you'll want to check out the Issues page on the Github repository. There you'll want to find the issue corresponding to the specific test case. Each issue will contain how to run the test case, the expected output, and a set of inputs with expected outputs. You can verify these against your own code and see if there are any problems.

Some new test cases were added. How do I download them?

Just pull the latest changes from the remote using submodule update:

git submodule update --remote

How do I contribute my own test cases?

To contribute your own test cases, you'll need to submit a pull request on Github. See this link to learn how to do so. You'll need a Github account, as well as a copy of your forked version of the repository (click 'Fork' at the top). Download the forked directory to your computer like so (make sure you're not in your project directory!):

git clone https://github.com/yourusernamehere/project1-tests
cd project1-tests

Now, add any of your test cases to the directory. Make sure to rename them using the numbering scheme (test#.txt, where # is the next largest number). Last, commit the files and push:

git add .
git commit -m "Added test case #."
git push origin master

Finally, submit a pull request to this repostitory, along with some inputs and expected outputs. Once you do that, your submission will be reviewed, an issue will be created for your test case, and the commit will be merged into the repository!

Help! I'm having trouble with something!

If you're having trouble with anything, don't hesitate to reach out to me. You can reach me in the CS 101 GroupMe, or you can just make a new issue here. Before you reach out, make sure to look through the issues here to see if the question hasn't been asked already (just to lower question volume as much as possible). After that, ask away!

Important

Please make sure you read the note at the top of this README. It is extremely important that you know that cheating will not be tolerated.

project1-tests's People

Contributors

samwightt avatar

Stargazers

Jake Z avatar

Watchers

James Cloos avatar  avatar

project1-tests's Issues

Test Case #2

To run:

./project1 tests/test2.txt

Expected Output

The number of words found in the file was 36068
The number of unique words found in the file was 5795

Input Set 1

Input

Please enter a word: t??

Expected Output

The word the appears 2331 times in the document.
The word to appears 774 times in the document.
The word th appears 45 times in the document.
The word tho appears 1 times in the document.
The word tc appears 1 times in the document.
The word two appears 56 times in the document.
The word too appears 9 times in the document.
The word top appears 22 times in the document.
The word ted appears 1 times in the document.
The word tv appears 3 times in the document.
The word tek appears 3 times in the document.
The word t appears 50 times in the document.
The word tom appears 1 times in the document.
The word til appears 2 times in the document.
The word tel appears 1 times in the document.
The word tim appears 1 times in the document.
The word ten appears 2 times in the document.
The word tie appears 1 times in the document.
The word try appears 1 times in the document.
The word tn appears 1 times in the document.
The word ta appears 1 times in the document.

Input Set 2

Input

Please enter a word: a???n???d???

Expected Output

The word and appears 1079 times in the document.
The word around appears 14 times in the document.
The word arnold appears 1 times in the document.
The word alongside appears 3 times in the document.
The word alienated appears 2 times in the document.
The word abandons appears 1 times in the document.
The word andrew appears 3 times in the document.
The word attendees appears 1 times in the document.
The word andr appears 1 times in the document.
The word andy appears 4 times in the document.
The word abandon appears 1 times in the document.
The word attend appears 3 times in the document.
The word attending appears 2 times in the document.
The word anybody appears 1 times in the document.
The word avenged appears 1 times in the document.

Input Set 3

Input

Please enter a word: ?e

Expected Output

The word be appears 122 times in the document.
The word me appears 28 times in the document.
The word he appears 158 times in the document.
The word we appears 56 times in the document.
The word e appears 5 times in the document.
The word de appears 7 times in the document.
The word re appears 18 times in the document.
The word ve appears 11 times in the document.

Input Set 4

Input

Please enter a word: col???

Expected Output

The word colin appears 1 times in the document.
The word colma appears 3 times in the document.
The word colon appears 1 times in the document.

Commit for reference: 5253aae

Test Case #3

To Run

./project1 tests/test3.txt

Expected Output

The number of words found in the file was 141491
The number of unique words found in the file was 9944

Input Set 1

Input

Please enter a word: a?d

Expected Output

The word and appears 5067 times in the document.
The word aid appears 14 times in the document.
The word add appears 7 times in the document.

Input Set 2

Input

Please enter a word: ???ver

Expected Output

The word ever appears 119 times in the document.
The word dover appears 16 times in the document.
The word driver appears 5 times in the document.
The word over appears 180 times in the document.
The word never appears 194 times in the document.
The word shiver appears 2 times in the document.
The word fever appears 7 times in the document.
The word silver appears 3 times in the document.
The word river appears 12 times in the document.
The word carver appears 1 times in the document.
The word liver appears 1 times in the document.
The word cover appears 2 times in the document.
The word lover appears 1 times in the document.

Input Set 3

Input

Please enter a word: ???????t?h?e?y

Expected Output

The word they appears 570 times in the document.
The word feathery appears 2 times in the document.
The word butchery appears 1 times in the document.

Input Set 4

Input

Please enter a word: p?o???e

Expected Output

The word people appears 145 times in the document.
The word produce appears 5 times in the document.
The word propose appears 3 times in the document.
The word promise appears 18 times in the document.
The word prove appears 3 times in the document.
The word polite appears 6 times in the document.
The word police appears 4 times in the document.
The word provide appears 9 times in the document.
The word pore appears 2 times in the document.

Test Case #1

To run:

./project1 tests/test1.txt

Expected Output

The number of words found in the file was 64
The number of unique words found in the file was 52

Input Set 1

Input

Please enter a word: of

Expected Output

The word of appears 2 times in the document.

Input Set 2

Input

Please enter a word: is

Expected Output

The word is appears 2 times in the document.

Input Set 3

Input

Please enter a word: or

Expected Output

The word or appears 2 times in the document.

Input Set 4

Input

Please enter a word: a?d

Expected Output

The word and appears 4 times in the document.

Input Set 5

Input

Please enter a word: a??

Expected Output

The word and appears 4 times in the document.
The word as appears 1 times in the document.
The word a appears 1 times in the document.

Commit for reference: 5ace1fa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.