I'm not an English native speaker, but I think your videos are very clearly, and very easy to understand. These series are very helpful for my job :)
@ccf19881030 Жыл бұрын
I'v never seen videos can explain gtest and gmock so clearly, Thanks!
@_jasneetsingh_ Жыл бұрын
thank you for providing repo and walking through the same to explain the concepts
@thirumalak20545 ай бұрын
i saw all the video and thanks for educating on gmock. i will write test cases now. thanks alot.
@anbazhagansakthivel24282 жыл бұрын
Very Well Structured and Delivered. Best tutorial for Gtest and Gmock
@arisaif2 жыл бұрын
Glad you found it helpful!
@MrNyamchom2 жыл бұрын
I have watched all 3 of your videos. Fantastic !
@PreetiBatra-j4xАй бұрын
Such a amazing content
@novozelhalt9223 Жыл бұрын
Broooo, holy shit so much good information in such short time… with code example… kudos, sir
@arisaif Жыл бұрын
Thank you!
@kavyasriudayakumar30452 жыл бұрын
Excellent Video Tutorial For GTest and GMock.This will be the best series for GTest and GMock , covering all topics. The way you explain things is really Osm, easy to understand.Keep Posting many tutorials like this.All the very best !!
@kamleshkumarsahu959710 ай бұрын
That jesus sticker is damn funny😂😂
@dhanrajk66145 ай бұрын
Hi Arif, I have one doubt. Whether this gmock work for testing the c code.
@danrooke11992 жыл бұрын
Great tutorial! One edit if you're interested: 1:08:19 you used the pointer to the &mock_bankserver for the BankOfAriServer instantiation. It should be &actual_bankserver ;-)
@АндрейБорисов-и4о2 жыл бұрын
Thank's Arisaif! Cool lessons!
@arisaif2 жыл бұрын
Glad you found them useful!
@andrewborysov92112 жыл бұрын
Thanks! Great video!
@rikkipunk2 жыл бұрын
Excellent explanation and great video! Thanks for sharing. On the other hand, I think there is an issue in the code of the file `tests/gmock_demo/expect_call_side_effects.cc` (50:48) that perhaps it is intentional to make the example more readable. Basically, that test will fail because Debit() is never called, due to the mock function GetBalance() is returning zero (the default value). So, I think it is necessary to add a EXPECT_CALL of GetBalance() setting it returns a positive number. Thanks again and I hope you continue delivering these interesting videos :)
@kirubar9459 Жыл бұрын
I am trying to mock a open() free function, my source file calls open(filepath, flag) which is defined in fctnl.h and int open(const char *__file, int __oflag, ...) is a variadic function. can u please let me know to mock this function? how to mock a free function with different arguments (say open() two argument open() three argument)?
@arisaif Жыл бұрын
You will get better answers if you post such questions on stack overflow. See my answer on a similar question here: stackoverflow.com/a/73613788/1383356
@vikramgondane50449 ай бұрын
any other preferable mock library for legacy code?
@rishiniranjan17462 жыл бұрын
For the part "Mocking Non-virtual classes" what if AtmMachine class has like "T bankserver_" , not the pointer type, so for such case how can we do the testing ?
@arisaif2 жыл бұрын
You can do this, but note that mocked classes are not copyable, so you won't be able to easily pass the mocked object to the class. However, you can do the opposite: return a pointer to the non-pointer member variable to the test. See an example here: github.com/ourarash/cpp-template/blob/master/tests/gmock_demo/mock_non_virtual_classes_non_pointer.cc
@87yassmin2 жыл бұрын
You're the best
@DifferentCoder Жыл бұрын
Hi Ari, thanks for your videos, it very helpful I have used VS2019 to try gmock functions, but something make me confused... I set Expectation a = EXPECT_CALL(c, xxx()); and EXPECT_CALL(c, ooo()).After(a); But I noticed that if xxx() did not use, only calls ooo() won't get any failure. Was that my environment problem, or it just by design? In my opinion, xxx() MUST be called, then I can call ooo(), but it looks not....
@arisaif Жыл бұрын
Not sure if I got your question. I think you will get a very good answer if you post it on stack overflow.
Hi could someone help me on doing a gtest for a program with classes n objects
@TheCapitalist_read_Das_Kapital2 жыл бұрын
I always have the question why gteat/gmock is written in MACROS, which can have so many undesirable side effects. What's the rationale hide this design?
@arisaif2 жыл бұрын
I think there are two reasons for this. First is historic reasons since Google Test has been around even before C++11 and a lot of things that are possible now without macros were not possible back then. Many things in Google Test have been updated not to use macros over the years. The other reason is that some might find it more abstract and cleaner to use a macro that hides many thing behind it rather than plain C++. For example, you can register your tests programmatically only using C++, but the interface doesn't look as clean: google.github.io/googletest/reference/testing.html#RegisterTest