Skip to content
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

Unittests for lru_cache.dart #1015

Closed
palisadoes opened this issue Nov 21, 2021 · 6 comments · Fixed by #1092
Closed

Unittests for lru_cache.dart #1015

palisadoes opened this issue Nov 21, 2021 · 6 comments · Fixed by #1092
Assignees

Comments

@palisadoes
Copy link
Contributor

The Talawa code base needs to be 100% reliable. This means we need to have 100% unittest code coverage.

We will need unittests done for all methods, classes and functions found in this file.

Any widgets referenced in this file must also have unittests done

after_auth_view_models/chat_view_models/lru_cache.dart

This file can be found in the lib/view_model directory

Parent Issue: #1003

@github-actions github-actions bot added the unapproved Unapproved, needs to be triaged label Nov 21, 2021
@palisadoes palisadoes added points 01 and removed unapproved Unapproved, needs to be triaged points 01 labels Nov 23, 2021
@nishnatadebnath
Copy link

Please assign this to me.

@nishnatadebnath
Copy link

nishnatadebnath commented Dec 24, 2021

@CyberWake I have some doubt regarding the logic used for the /after_auth_view_models/chat_view_models/lru_cache.dart .
So while testing it I found out that we are initializing the LRUChatListCache using the following constructer.

LRUChatListCache() {
    cache = <String, ChatListNode>{};

    head = ChatListNode();

    tail = ChatListNode();

    head.next = tail;

    tail.prev = head;
  }

So now my doubt is should not we initialise the head and tail pointing to the same chatListNode at first addition of a chat,again if there is no chat we should not be having those initializations and head and tail should point to null.

@nishnatadebnath
Copy link

@palisadoes the lru_cache.dart code logic is bugged ,can I make changes to the code so that it works properly along with the unit testing?

@palisadoes
Copy link
Contributor Author

Yes

@palisadoes palisadoes added the wip Work in Progress label Dec 28, 2021
@palisadoes
Copy link
Contributor Author

@nishnatadebnath Are you still working on this?

@nishnatadebnath
Copy link

Yes . Sorry for the delay @palisadoes , shifting to college hostel I will complete it by 24 hr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants