Exemplo n.º 1
0
int main()
{
	PaperFold lala;
	vector <int> a0;
	vector <int> a1;
	a0.push_back(1895);
	a0.push_back(6416);
	a1.push_back(401);
	a1.push_back(1000);
	lala.numFolds(a0,a1);
	return 0;
}
Exemplo n.º 2
0
    void testCase5() {
        int paper_[] = {1895, 6416};
        vector<int> paper(paper_, paper_ + (sizeof(paper_) / sizeof(paper_[0])));
        int box_[] = {401, 1000};
        vector<int> box(box_, box_ + (sizeof(box_) / sizeof(box_[0])));
		int expected_ = 5;
        assertEquals(5, expected_, solution.numFolds(paper, box));
    }
Exemplo n.º 3
0
    void testCase4() {
        int paper_[] = {100, 30};
        vector<int> paper(paper_, paper_ + (sizeof(paper_) / sizeof(paper_[0])));
        int box_[] = {60, 110};
        vector<int> box(box_, box_ + (sizeof(box_) / sizeof(box_[0])));
		int expected_ = 0;
        assertEquals(4, expected_, solution.numFolds(paper, box));
    }
Exemplo n.º 4
0
    void testCase3() {
        int paper_[] = {1000, 1000};
        vector<int> paper(paper_, paper_ + (sizeof(paper_) / sizeof(paper_[0])));
        int box_[] = {62, 63};
        vector<int> box(box_, box_ + (sizeof(box_) / sizeof(box_[0])));
		int expected_ = -1;
        assertEquals(3, expected_, solution.numFolds(paper, box));
    }
Exemplo n.º 5
0
    void testCase2() {
        int paper_[] = {11, 17};
        vector<int> paper(paper_, paper_ + (sizeof(paper_) / sizeof(paper_[0])));
        int box_[] = {5, 4};
        vector<int> box(box_, box_ + (sizeof(box_) / sizeof(box_[0])));
		int expected_ = 4;
        assertEquals(2, expected_, solution.numFolds(paper, box));
    }
Exemplo n.º 6
0
    void testCase0() {
        int paper_[] = {8, 11};
        vector<int> paper(paper_, paper_ + (sizeof(paper_) / sizeof(paper_[0])));
        int box_[] = {6, 10};
        vector<int> box(box_, box_ + (sizeof(box_) / sizeof(box_[0])));
		int expected_ = 1;
        assertEquals(0, expected_, solution.numFolds(paper, box));
    }