PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Allowing for the value of *D to change
Date: Sunday, 05 Apr 2020, 09:34:19


    > Message Posted By: Unknown
    >
    > Are there any specific tests in the test script that check that our
    > implementation of the Deque ADT allows the value of *D to be changed (note
    > 4 in the spec)? If not, is there any way we can test this? I'm not sure if
    > my implementation allows for this, and I'd like a way to see if it does.

The requirement that *d may change restricts how
Qsort.c calls the Deque functions, not how they
are implemented.

There are no public tests of this, but you can easily
create your own by modifying your implementation of one
or more of the Deque functions to change the value of
*d (e.g., by malloc()-ing a new struct deque, copying
the contents of *d there, and then setting *d to its
address.

--Stan-
PREV INDEX NEXT