Skip to content

circular-buffer: Make exercise schema-compliant. #681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion exercises/circular-buffer/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"#": [
"exercise": "circular-buffer",
"version": "1.0.0",
"comments": [
"In general, these circular buffers are expected to be stateful,",
"and each language will operate on them differently.",
"Tests tend to perform a series of operations, some of which expect a certain result.",
Expand All @@ -25,6 +27,7 @@
"cases": [
{
"description": "reading empty buffer should fail",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -35,6 +38,7 @@
},
{
"description": "can read an item just written",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -51,6 +55,7 @@
},
{
"description": "each item may only be read once",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -71,6 +76,7 @@
},
{
"description": "items are read in the order they are written",
"property": "run",
"capacity": 2,
"operations": [
{
Expand All @@ -97,6 +103,7 @@
},
{
"description": "full buffer can't be written to",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -113,6 +120,7 @@
},
{
"description": "a read frees up capacity for another write",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -139,6 +147,7 @@
},
{
"description": "read position is maintained even across multiple writes",
"property": "run",
"capacity": 3,
"operations": [
{
Expand Down Expand Up @@ -175,6 +184,7 @@
},
{
"description": "items cleared out of buffer can't be read",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -193,6 +203,7 @@
},
{
"description": "clear frees up capacity for another write",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -217,6 +228,7 @@
},
{
"description": "clear does nothing on empty buffer",
"property": "run",
"capacity": 1,
"operations": [
{
Expand All @@ -236,6 +248,7 @@
},
{
"description": "overwrite acts like write on non-full buffer",
"property": "run",
"capacity": 2,
"operations": [
{
Expand All @@ -261,6 +274,7 @@
},
{
"description": "overwrite removes the oldest item on full buffer",
"property": "run",
"capacity": 2,
"operations": [
{
Expand Down Expand Up @@ -291,6 +305,7 @@
},
{
"description": "overwrite doesn't remove an already-read item",
"property": "run",
"capacity": 3,
"operations": [
{
Expand Down