Unverified Commit a281e59a authored by jcechace's avatar jcechace
Browse files

Readme update and test cleanup

parent 0dddb951
Pipeline #127372 failed with stage
in 38 seconds
......@@ -2,14 +2,20 @@ Homework assignment no. 2, Labels
**Publication date:** April 8rd, 2022
**Submission deadline:** April 29th, 2022
**Point:** 12 points maximum (7 for functionally correct solution, 5 for architecture)
**Bonus Points:** 3 (can only compensate lost points from homeworks and iterations)
Change Log
* 11.4: Added point information and note about operators in grammar section
* 11.4: Test cleanup
General information
General Information
The goal of this homework is to implement a library capable of matching and filtering labeled items based on a simplified boolean expressions.
### Labeled object
### Labeled Object
Labeled object is an instance of class implementing the provided ``HasLabels`` interface.
......@@ -56,6 +62,8 @@ space = ? zero or more space characters ? ;
*Note: I fully admit that the grammar may be flawed*
*Important:* For simplicity, both operations `&` and `|` are left associative with the same operator priority.
### Bonus Assignment
For bonus points you can also support parentheses.
......@@ -35,9 +35,6 @@ public class LabelExpressionFilterTest extends AbstractLabelExpressionFilterTest
expectFiltered(LabelFilter::distinct, news, fishArticles, "fish & news | !bees | dogs", articles(2, 3, 5));
expectFiltered(LabelFilter::distinct, fishArticles, articles, "fish & !bees | dogs", articles(2));
expectFiltered(LabelFilter::distinct, fishArticles, beeArticles, "!fish & !bees", articles());
expectFiltered(LabelFilter::intersection, articles, beeArticles, "Story", articles(6));
expectFiltered(LabelFilter::intersection, articles, fishArticles, "Story", articles(3, 5));
expectFiltered(LabelFilter::intersection, beeArticles, fishArticles, "Story", articles());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment