Giter VIP home page Giter VIP logo

pgdp-tests-ws21-22's Introduction

Hey there 👋

Jonas Ladner's GitHub stats

📫 Currently searching for a student working / internship opportunity: [email protected]

pgdp-tests-ws21-22's People

Contributors

0xreself avatar 16domsim avatar antecrescent avatar dorianim avatar ewelohd avatar flooxo avatar jpx3 avatar ladnerjonas avatar mariusdkm avatar nkrofta avatar paulzhng avatar philippspohn avatar rank-p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pgdp-tests-ws21-22's Issues

Change assessment of insert()

Homework Number W09H01

Citation of the homework instruction:
insert() Falls ein gleiches Tupel bereits vorhanden ist, wird das übergebene Tupel verworfen. Es soll das Tupel zurückgegeben werden, welches letztendlich im Pool gespeichert ist.

Additional Information:
If I understand assertEquals() correctly, it assesses the equality of the given tuples. For that, it uses our implementation of tuple.equals(other). What we want though, is an assessment of identity.

This should fail, but does not:
assertEquals(tuple0Duplicate, pool0.insert(tuple0Duplicate));

I suggest, we change the test according to this example:

assertEquals(tuple0, pool0.insert(tuple0Duplicate)); //old

/* assertEquals(expected, test of identity) */
assertEquals(true, pool0.insert(tuple0Duplicate) == tuple0);
assertEquals(false, pool0.insert(tuple0Duplicate) == tuple0Duplicate);

new issue

Homework Number (example: W04H01):
W12H01
Citation of the homework instruction:

Additional Information:
testMultiplication and addition are failing for me (the first ones) but the other pass.So i wanted to ask what do they test exactly

toString TradeOrder

Homework Number (example: W06H01):

Citation of the homework instruction:
toString: TradeOrder: Die⎵Bestellung(Einzeln)⎵hat⎵ein⎵Gesamtgewicht⎵von⎵g⎵und⎵kostet⎵PD.

Der Wert eines PinguFood-Objekts berechnet sich durch weight*ppg

Additional Information:
Ich habe das so verstanden, dass totalCost nicht die Kosten pro Gramm sind, wie es in den Tests suggeriert wird, sondern der Preis der ganzen Bestellung, also für 200g mit einem Preis von 2, dann 400PD.

Englisch:
I understood it to mean that totalCost is not the cost per gram, as suggested in the tests, but the price of the entire order, i.e. for 200g with a price of 2, then 400PD.

edit: Der Wert eines PinguFood-Objekts berechnet sich durch weight*ppg

W08H01: Early Homework clone results in a ArrayIndexOutOfBoundsException

Homework Number: W08H01

Citation of the homework instruction: -

Additional Information:
Depending on your homework start date one line (number 61) in MazeParser has to be replaced:

Maze.TileState[][] tiles = new Maze.TileState[lines[0].length()][lines.length];

to

Maze.TileState[][] tiles = new Maze.TileState[lines.length][lines[0].length()];

Keep in mind, that you should not push these changes. No warranty is given.

isOrderFulfilledAmountOrder

Homework Number W06H01:

TradeOrderAndHeirsTest:
line 129 should expect true since an order should not be supplied if the order is already fulfilled, therefore adding order in line 127 should not make a difference.

W03H01 - Warum null als Datum?

Hi, ich verstehe nicht warum beim AuthorTest bei testEquals() beim letzten Testfall null für birthday angegeben wird. Das führt doch normalerweise zu einer NullPointerException.

assertFalse(AUTHOR.equals(new Author("Max", "Mustermann", "Pinguinstraße 1",
                "[email protected]", null)));

In der Angabe wird jedoch nirgends der Fall beschrieben, dass birthday (oder ein anderer Parameter) null ist, warum wird er dann hier auf so ein Fall getestet? Oder hab ich was falsch verstanden?

LG

W04H02: AuthorTest schlagen bei gewisser Zeit fehl

Wenn man die Methode getAgeTest() in AuthorTest zwischen 0:00Uhr und 1:00Uhr ausführt, schägt diese, trotz richtiger Implementierung, fehl.

Dies liegt am zweiten Test, welcher wie folgt aussieht:

Author author2 = new Author("Max", "Mustermann", "Garching-City", "[email protected]", new Date(LocalDate.now().getDayOfMonth(), LocalDate.now().getMonthValue(), LocalDate.now().getYear()));
assertEquals(0, author2.getAge());

Bei diesem Test wird LocalDate.now() benutzt, um das aktuelle Datum zu bekommen. Allerdings wird dieses Datum anhand der lokalen Zeitzone gebildet (UTC+1). Die Klassen sollen allerdings in UTC +0 getestet werden.

Um das Problem zu beheben, schlage ich vor LocalDate.now() mit LocalDate.now(ZoneOffset.UTC) auszutauschen, sodass die Klasse so aussieht:

import java.time.ZoneOffset;
...
public class AuthorTest {
    ...
    Author author2 = new Author("Max", "Mustermann", "Garching-City", "[email protected]", new Date(LocalDate.now(ZoneOffset.UTC).getDayOfMonth(), LocalDate.now(ZoneOffset.UTC).getMonthValue(), LocalDate.now(ZoneOffset.UTC).getYear()));
    assertEquals(0, author2.getAge());
    ...
}

Alternativ könnte auch die Methode today() von der Klasse Date benutzt werden:

public class AuthorTest {
    ...
    Author author2 = new Author("Max", "Mustermann", "Garching-City", "[email protected]", new Date(Date.today().getDay(), Date.today().getMonth(), Date.today().getYear()));
    assertEquals(0, author2.getAge());
    ...
}

W12H01 test, getComputeThreadCounter

W12H01 tests:

Is it possible that the tests don't consider the following scenario? https://zulip.in.tum.de/#narrow/stream/893-PGdP-W12H01--.20Parallel.20PinguMath/topic/.E2.9C.94.20ComputeThreadCounter
It seems like testMinDim, testMultithreadingAddition, and testMultithreadingMultiplication expect the getComputerThreadCounter to be 4/8, but it's possible to have 5/9 if a thread has been started as described in the Zulip post.

Sorry if this has been mentioned somewhere else, and thanks for the tests :)

LinkedDocumentCollectionTest

Homework Number W0701

line 109.
Meiner Meinung nach sollte size 5 und nicht 4 sein. Wir haben vor line 108 3 LinkedDocuments und 1 DummyLinked(Adresse abc) in der Sammlung. Allerdings entfernt die add Methode keine Dummy Elemente? Zumindest kann ich das der Aufgabenstellung nicht entnehmen. Folglich sollte also in der Collection einfach ein LinkedDocument eingefügt werden, welches die gleiche Addresse wie das DummyElement hat.

Fälschlicherweise werden 2 leeren Zeilen nach Ausgabe erwartet

UnitTests W02H02, MarketEndDayPropertiesTest:
Assert.assertEquals("Der Laden der Saleuine Claudia und Karl-Heinz hat am 2. Tag 85.0PD eingenommen." + System.lineSeparator() + "Dafür wurden 1 Krustentiere, 2 Sardellen und 3 Sardinen verkauft." + System.lineSeparator() + "Insgesamt hat der Laden 255.0PD eingenommen.\n" + System.lineSeparator(), outputStreamCaptor.toString().substring(0, (outputStreamCaptor.toString()).length() - 2));

Nach dem '\n' kommt noch ein lineseparator und demnach werden 2 leere Zeilen nach der Ausgabe erwartet, auch wenn in der Aufgabenstellung steht, dass man nur eine haben sollte.

Testfall stellt höhere Anforderungen als Spezifikation: 118264581564861424L > 10¹⁷

Homework Number: W04H01

In der Spezifikation steht, dass isCentralBin bei Eingaben bis n kleiner gleich 10¹⁷ funktionieren soll. Getestet wird hier aber ein Fall größer als 10¹⁷.

Citation of the homework instruction:
[...]
isCentralBin:
[...]
Eingaben mit n≤10¹⁷ müssen korrekt und effizient behandelt werden.

Testfall
Arguments.of(118264581564861424L, true)

In meinem Fall macht tatsächlich genau das den Unterschied^^

registerUnusedFoodTest implemented incorrectly

Homework Number (example: W06H01):

PinguFoodLogisticsTest.java line 47:

wrong assumption about wasted food, statistic shall not be set to zero after clearing orderBook.
Right would be:
"Bisher konnten 15 Tiere mit einem Gesamtgewicht von 2373g nicht verwertet werden.
Claudia und Karl-Heinz ist dadurch ein Profit von 35595PD entgangen."

W08H01: Missing Test: solveMazeFrom impossible path from position to exit

Homework Number: W08H01

Citation of the homework instruction:

static Path solveMazeFrom(Maze maze, Position position):
[....]
Sollte ein solcher Pfad nicht mehr existieren, soll null zurückgegeben werden.

Additional Information:

Maze
[....]
du kannst aber davon ausgehen, dass der exit immer vom entrance aus erreichbar ist.

Position can be != Entrance, and thus, this case has to be tested aswell.
#33

Thanks @mani 🏅

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.