Created
May 15, 2020 09:54
-
-
Save 0017031/0d7afef837191e6653ca35a14070a527 to your computer and use it in GitHub Desktop.
Unit testing in CLion [https://youtu.be/_MhbaVtcrR0], subtitle, english, auto-translated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
00:00:06,589 --> 00:00:14,360 | |
to my baboons from tom de village asia and to say everywhere will be with | |
2 | |
00:00:16,640 --> 00:00:24,920 | |
hello thanks for coming thanks dmitry for introducing me a little | |
3 | |
00:00:24,920 --> 00:00:31,680 | |
let's talk about unit testing in our food and about the framework itself for starters | |
4 | |
00:00:31,680 --> 00:00:36,660 | |
to appreciate the audience a little please raise the hands of those who have ever | |
5 | |
00:00:36,660 --> 00:00:39,300 | |
used google tests in my projects | |
6 | |
00:00:39,300 --> 00:00:45,120 | |
but ever yeah, apparently it’s about half the room, and which are like | |
7 | |
00:00:45,120 --> 00:00:51,719 | |
any unit testing framework at all | |
8 | |
00:00:51,719 --> 00:00:58,620 | |
about the same half of the hall ok thanks i will try on the most | |
9 | |
00:00:58,620 --> 00:01:02,969 | |
basic things do not stop much but I just know that some people | |
10 | |
00:01:02,969 --> 00:01:06,180 | |
came to listen in general as a whole and find out what it is | |
11 | |
00:01:06,180 --> 00:01:12,630 | |
this is generally some kind of framework usually chosen, especially for | |
12 | |
00:01:12,630 --> 00:01:17,070 | |
I want to have testing, of course, so that it is simply understandable in | |
13 | |
00:01:17,070 --> 00:01:21,900 | |
use to make tests convenient | |
14 | |
00:01:21,900 --> 00:01:26,220 | |
group logically so that this structure is the hierarchy of aphids | |
15 | |
00:01:26,220 --> 00:01:33,540 | |
somehow reflected the working code so that the test results were | |
16 | |
00:01:33,540 --> 00:01:41,490 | |
understandable at a glance informative so that from gorg itself would be painless | |
17 | |
00:01:41,490 --> 00:01:45,420 | |
ported between platforms for some projects it could be | |
18 | |
00:01:45,420 --> 00:01:51,479 | |
it’s fundamentally important and of course that all this be fast enough and | |
19 | |
00:01:51,479 --> 00:01:56,869 | |
productive because by making some changes to your program and | |
20 | |
00:01:56,869 --> 00:02:03,450 | |
writing tests I want to get the result as quickly as possible, in general, with all this | |
21 | |
00:02:03,450 --> 00:02:09,538 | |
guided by google and a few years ago when choosing a framework for | |
22 | |
00:02:09,538 --> 00:02:17,010 | |
judging by the description on their page, nothing acceptable for | |
23 | |
00:02:17,010 --> 00:02:22,310 | |
they didn’t find themselves because they lost their own from a sufficiently rich set | |
24 | |
00:02:22,310 --> 00:02:31,380 | |
functionality turned out with a wide selection of assertion of with the ability | |
25 | |
00:02:31,380 --> 00:02:36,540 | |
various parameterization and types of values with convenient | |
26 | |
00:02:36,540 --> 00:02:41,090 | |
launch configurations and for a different platform too | |
27 | |
00:02:41,090 --> 00:02:47,930 | |
supported to start using this framework | |
28 | |
00:02:47,930 --> 00:02:57,390 | |
you need to understand that well this is a certain set of header files and jerk libraries | |
29 | |
00:02:57,390 --> 00:03:02,190 | |
open source on and its sources and documentation are on the github for | |
30 | |
00:03:02,190 --> 00:03:06,510 | |
in order to start working with it you need to download the source code to collect the local | |
31 | |
00:03:06,510 --> 00:03:10,080 | |
library and connect to your test program | |
32 | |
00:03:10,080 --> 00:03:15,170 | |
google itself does not recommend using any of the combined binary of | |
33 | |
00:03:15,170 --> 00:03:24,060 | |
that’s why I made in my source code many options for supporting various | |
34 | |
00:03:24,060 --> 00:03:28,290 | |
build system for all platforms most of the most popular | |
35 | |
00:03:28,290 --> 00:03:35,700 | |
so that it is not a problem to collect their solutions, let's see how it can be | |
36 | |
00:03:35,700 --> 00:03:43,519 | |
make our core here I have a folder in which already | |
37 | |
00:03:43,519 --> 00:03:49,830 | |
downloaded sources are unpacked; it contains google test and google could | |
38 | |
00:03:49,830 --> 00:03:52,500 | |
this is also another framework maybe you heard | |
39 | |
00:03:52,500 --> 00:03:59,160 | |
they recently consolidated into one, I don’t know how many people | |
40 | |
00:03:59,160 --> 00:04:04,709 | |
familiar to us by force but in general ours yes I currently only support | |
41 | |
00:04:04,709 --> 00:04:09,959 | |
one assembly system is families and the main file is such a system | |
42 | |
00:04:09,959 --> 00:04:17,700 | |
is a worm family the same file we see in the source directory for | |
43 | |
00:04:17,700 --> 00:04:23,960 | |
framework therefore in it actually we can look in it and are described as | |
44 | |
00:04:23,960 --> 00:04:29,940 | |
collect their various targets and therefore it’s enough for us | |
45 | |
00:04:29,940 --> 00:04:38,310 | |
just connect this file by writing the path to it and | |
46 | |
00:04:38,310 --> 00:04:50,340 | |
Of course, specifying the path to the directory that lie a little deeper in google test | |
47 | |
00:04:50,340 --> 00:05:00,500 | |
in cloud and link our test program called google | |
48 | |
00:05:01,010 --> 00:05:12,120 | |
smoke with the g test library and we can start the family generation because | |
49 | |
00:05:12,120 --> 00:05:19,770 | |
we are a third-party project source code of a third-party framework we can | |
50 | |
00:05:19,770 --> 00:05:25,230 | |
put this directory as containing library files so we | |
51 | |
00:05:25,230 --> 00:05:29,970 | |
we will be able to navigate and see what's there inside implemented but when | |
52 | |
00:05:29,970 --> 00:05:34,860 | |
indexing work with all sorts of refactoring mines and yes it will simplify it | |
53 | |
00:05:34,860 --> 00:05:44,480 | |
task, so we clearly say that we don’t want to change anything there, now let's go to | |
54 | |
00:05:44,480 --> 00:05:51,980 | |
our empty source file must be connected to the main | |
55 | |
00:05:51,980 --> 00:06:00,960 | |
header file g test which contains everything you need and now we | |
56 | |
00:06:00,960 --> 00:06:08,130 | |
such an action is available as generating both tests and a fix test; here we generate it here | |
57 | |
00:06:08,130 --> 00:06:13,820 | |
in-place tests tests then such a unit actually testing | |
58 | |
00:06:13,820 --> 00:06:22,430 | |
which describes a certain input scenario, it takes the name dough vasyuta | |
59 | |
00:06:22,430 --> 00:06:31,140 | |
let's call it basic test with yours for now, let’s leave it like this here basically already | |
60 | |
00:06:31,140 --> 00:06:37,590 | |
we can call the context menu to launch it in this way | |
61 | |
00:06:37,590 --> 00:06:44,389 | |
this test is the only one we see that we are missing we are on our test | |
62 | |
00:06:44,389 --> 00:06:52,030 | |
the program doesn’t need us so we will take the one that comes with the framework | |
63 | |
00:06:52,030 --> 00:07:01,160 | |
it looks quite simple in all sorts of tutorials it also shows like this | |
64 | |
00:07:01,160 --> 00:07:07,419 | |
to do in general, the initialization of all tests is called here | |
65 | |
00:07:07,419 --> 00:07:13,700 | |
by transferring all the keys that our program was called with | |
66 | |
00:07:13,700 --> 00:07:21,229 | |
and the framework doesn’t make us explicitly list somewhere which tests we | |
67 | |
00:07:21,229 --> 00:07:30,080 | |
announced that to collect all of them it is enough to call the macro with a uranium test and it will collect | |
68 | |
00:07:30,080 --> 00:07:39,020 | |
we launch information about all the necessary tests in our program again | |
69 | |
00:07:39,020 --> 00:07:47,479 | |
and we see in the results window that our test does nothing | |
70 | |
00:07:47,479 --> 00:07:57,560 | |
does nothing successfully he has oh so simple name with her is in basic | |
71 | |
00:07:57,560 --> 00:08:05,110 | |
network test well, and so far enough | |
72 | |
00:08:06,610 --> 00:08:11,660 | |
I’ll talk a little bit about the poher tires. | |
73 | |
00:08:11,660 --> 00:08:17,360 | |
assertion and these are special macros for testing which | |
74 | |
00:08:17,360 --> 00:08:22,370 | |
check conditions to fulfill the conditions are divided into | |
75 | |
00:08:22,370 --> 00:08:26,950 | |
2 categories basic this first begins with the word | |
76 | |
00:08:26,950 --> 00:08:34,059 | |
assert and serves to check critical sections of code if the condition is not | |
77 | |
00:08:34,059 --> 00:08:41,208 | |
it is executed on this all execution of the test script ends | |
78 | |
00:08:41,208 --> 00:08:45,500 | |
despite the fact that we have written further there and the second group is not | |
79 | |
00:08:45,500 --> 00:08:49,430 | |
critical assertion and and when it is more important for us to drive | |
80 | |
00:08:49,430 --> 00:08:51,829 | |
weight test script see all results | |
81 | |
00:08:51,829 --> 00:08:59,350 | |
it’s better to use it also between these two categories | |
82 | |
00:08:59,350 --> 00:09:06,970 | |
a completely symmetric set of all kinds of logical checks the most basic on | |
83 | |
00:09:07,630 --> 00:09:14,060 | |
the truth or falsity of the comparison check is more less and so on in | |
84 | |
00:09:14,060 --> 00:09:21,080 | |
as a result, we get such a joint structure acer true it basically | |
85 | |
00:09:21,080 --> 00:09:32,270 | |
quite speaking in and of themselves here's what's next for the lines highlighted | |
86 | |
00:09:32,270 --> 00:09:38,500 | |
special such subclass for string comparison case-sensitive and case-insensitive | |
87 | |
00:09:38,500 --> 00:09:43,550 | |
anatol check throws a specific piece of code | |
88 | |
00:09:43,550 --> 00:09:49,310 | |
exceptions or do not throw there will be interesting category without testing them | |
89 | |
00:09:49,310 --> 00:09:54,310 | |
the condition is that the program terminates with some kind of error code and | |
90 | |
00:09:54,310 --> 00:10:00,200 | |
it is killed by a signal and checked there what is returned at the moment | |
91 | |
00:10:00,200 --> 00:10:07,430 | |
for example, it is the expected return code, and that while in the error output stream we | |
92 | |
00:10:07,430 --> 00:10:13,940 | |
write something about what happened at that moment if all of this | |
93 | |
00:10:13,940 --> 00:10:19,670 | |
all these checks are not enough and the best you can think of is to write there | |
94 | |
00:10:19,670 --> 00:10:23,110 | |
some acer true and pass some very difficult conditions to it | |
95 | |
00:10:23,110 --> 00:10:27,440 | |
here it is also possible to use your own functions | |
96 | |
00:10:27,440 --> 00:10:37,390 | |
predicates that return more as a check for passing conditions | |
97 | |
00:10:37,390 --> 00:10:42,770 | |
test of the script, then such a macro will look like assert before it in | |
98 | |
00:10:42,770 --> 00:10:47,870 | |
at the end of the figure, k will mean how many parameters your predicate always takes | |
99 | |
00:10:47,870 --> 00:10:55,430 | |
the same thing is predicate format only here perry is determined by test output | |
100 | |
00:10:55,430 --> 00:11:01,430 | |
results to one way to write messages about | |
101 | |
00:11:01,430 --> 00:11:07,850 | |
test errors let's add some of these bricks | |
102 | |
00:11:07,850 --> 00:11:23,449 | |
test to us here we will compare primes we have a certain | |
103 | |
00:11:23,449 --> 00:11:32,360 | |
already a certain homework which has a simple listing | |
104 | |
00:11:32,360 --> 00:11:41,300 | |
from one to three and we want to let check let's do so | |
105 | |
00:11:41,300 --> 00:11:51,100 | |
to be seen at the same time we want | |
106 | |
00:11:51,160 --> 00:11:59,660 | |
check that the most basic thing is that unity is equal to unity | |
107 | |
00:11:59,660 --> 00:12:01,720 | |
and | |
108 | |
00:12:06,550 --> 00:12:13,730 | |
also, when typing these macros through a comp, it’s only naturally not necessary | |
109 | |
00:12:13,730 --> 00:12:19,459 | |
to collect all this long wire entirely enough to dial the beginning | |
110 | |
00:12:19,459 --> 00:12:24,860 | |
of each compound word component in this case we want to check that | |
111 | |
00:12:24,860 --> 00:12:28,509 | |
something will be more than something | |
112 | |
00:12:38,769 --> 00:12:45,360 | |
connect our header file | |
113 | |
00:12:51,130 --> 00:12:57,070 | |
called numbers that's | |
114 | |
00:12:59,410 --> 00:13:11,930 | |
run the test with the new values run these orange ones | |
115 | |
00:13:11,930 --> 00:13:17,810 | |
exclamation marks mean that the test did not pass, we can again hera | |
116 | |
00:13:17,810 --> 00:13:24,910 | |
instead of where the problem occurred, so far we are interested in these results and | |
117 | |
00:13:24,910 --> 00:13:30,110 | |
we see that we expected one to be more than two, that is, in fact, simply | |
118 | |
00:13:30,110 --> 00:13:33,650 | |
mixed up the arguments we can quickly fix it | |
119 | |
00:13:33,650 --> 00:13:40,180 | |
and here there is a fairly useful checkmark such a field test | |
120 | |
00:13:40,180 --> 00:13:45,950 | |
in this case, of course, we have only one test so far, but when there are a lot of them, in principle | |
121 | |
00:13:45,950 --> 00:13:51,350 | |
it’s convenient to run away only those who have fallen, now the test is performed so | |
122 | |
00:13:51,350 --> 00:14:01,420 | |
as we expected here and create some sort of another one in the same all those | |
123 | |
00:14:01,660 --> 00:14:04,840 | |
let's call him | |
124 | |
00:14:05,380 --> 00:14:09,520 | |
that string test | |
125 | |
00:14:10,720 --> 00:14:17,120 | |
there is some kind of simple function below | |
126 | |
00:14:17,120 --> 00:14:22,030 | |
which turns numbers to string representation | |
127 | |
00:14:24,640 --> 00:14:30,800 | |
here we will use the work with strings that is, we expect what will happen | |
128 | |
00:14:30,800 --> 00:14:40,480 | |
one function will return to us, we will transfer one there and completing a statement | |
129 | |
00:14:40,480 --> 00:14:45,820 | |
do the same for the two but use | |
130 | |
00:14:45,820 --> 00:14:53,420 | |
heart to us which doesn’t care in what register it is written and pass | |
131 | |
00:14:53,420 --> 00:15:02,020 | |
there two and also check how much | |
132 | |
00:15:02,329 --> 00:15:09,110 | |
successful or or not successfully working with us function when we pass there 0 | |
133 | |
00:15:09,110 --> 00:15:13,899 | |
we will expect something like zeros to transfer the function | |
134 | |
00:15:13,899 --> 00:15:21,110 | |
and run this test separately it is also calling inside | |
135 | |
00:15:21,110 --> 00:15:34,999 | |
test action frames test expectedly fails and we expect green | |
136 | |
00:15:34,999 --> 00:15:40,579 | |
some rubbish is returned and if we go a file with a description we | |
137 | |
00:15:40,579 --> 00:15:46,339 | |
we see that the hyenas even a yellow light tells what could be | |
138 | |
00:15:46,339 --> 00:15:53,149 | |
the problem we forgot to specify a default statement here let's say | |
139 | |
00:15:53,149 --> 00:15:57,369 | |
return something like but | |
140 | |
00:16:00,009 --> 00:16:07,189 | |
Perry run the test again to make sure that our changes test from | |
141 | |
00:16:07,189 --> 00:16:11,709 | |
I didn’t go through it better, but at least now we see some | |
142 | |
00:16:11,709 --> 00:16:15,549 | |
digestible error messages | |
143 | |
00:16:17,559 --> 00:16:27,009 | |
you can also configure here which tests will be expressed using | |
144 | |
00:16:27,009 --> 00:16:34,249 | |
here you can remove the check marks successfully passed the test and you can look at them | |
145 | |
00:16:34,249 --> 00:16:38,389 | |
rejoice that they went sorted alphabetically by time | |
146 | |
00:16:38,389 --> 00:16:41,379 | |
passing and | |
147 | |
00:16:41,499 --> 00:16:48,649 | |
then the feature that was made from report generation in xml and html too | |
148 | |
00:16:48,649 --> 00:16:56,410 | |
it is made easy enough to increase however it is such a simple example | |
149 | |
00:16:56,410 --> 00:17:07,020 | |
Also, many probably know that to use the same data | |
150 | |
00:17:07,020 --> 00:17:13,650 | |
general configurations between tests so that in each test not to arrange a location there I | |
151 | |
00:17:13,650 --> 00:17:22,440 | |
location of resources using test classes so-called test FIG che in them | |
152 | |
00:17:22,440 --> 00:17:26,970 | |
you can define constructors and destructors that will | |
153 | |
00:17:26,970 --> 00:17:33,930 | |
It is called when entering and exiting each test. It does the same with methods. | |
154 | |
00:17:33,930 --> 00:17:41,790 | |
poker gave in google test if for you operation on location of geo-location of resources | |
155 | |
00:17:41,790 --> 00:17:48,240 | |
at the entrance and exit of each test is too expensive then you can and you are sure | |
156 | |
00:17:48,240 --> 00:17:52,860 | |
that you get them even if how do you get me this data then all then return to the place | |
157 | |
00:17:52,860 --> 00:18:00,300 | |
and then you can marry those resources between tests within the framework of one from this class | |
158 | |
00:18:00,300 --> 00:18:14,360 | |
or throughout the program let's add volk | |
159 | |
00:18:15,330 --> 00:18:23,830 | |
in which we will use a test class, let's call it something acts | |
160 | |
00:18:23,830 --> 00:18:41,950 | |
the fixer here we also need to add and by the way forgot to pay attention to what's there | |
161 | |
00:18:41,950 --> 00:18:47,830 | |
by default, when creating a file, he suggests adding a test to the target | |
162 | |
00:18:47,830 --> 00:18:53,649 | |
so that the source file is added to the assembly, here we are and we see here in our main | |
163 | |
00:18:53,649 --> 00:19:02,110 | |
files for assembly and now here too we will add our main header file g | |
164 | |
00:19:02,110 --> 00:19:12,100 | |
hi here we can generate a certain test figs we will test too | |
165 | |
00:19:12,100 --> 00:19:24,909 | |
a very simple class that implements an array-based queue in general | |
166 | |
00:19:24,909 --> 00:19:30,809 | |
he has an interface like any queue | |
167 | |
00:19:31,019 --> 00:19:38,019 | |
plain he knows how to add and remove in line and also | |
168 | |
00:19:38,019 --> 00:19:46,320 | |
returns its value, but this method is defined in our base class | |
169 | |
00:19:46,320 --> 00:19:51,039 | |
since we will test call our class app and | |
170 | |
00:19:51,039 --> 00:19:57,600 | |
Kew all the time I forget how much you | |
171 | |
00:19:58,559 --> 00:20:01,559 | |
picture | |
172 | |
00:20:01,639 --> 00:20:10,129 | |
and here we will generate a setup of methods for initializing the actual data for | |
173 | |
00:20:10,129 --> 00:20:15,309 | |
each test will be stored here | |
174 | |
00:20:15,609 --> 00:20:31,539 | |
a pointer to the queue itself for importing the file with the definition; here we also select | |
175 | |
00:20:31,539 --> 00:20:44,440 | |
under it, we will also generate a destructor to free these resources | |
176 | |
00:20:50,870 --> 00:20:59,510 | |
here and now we generate one more test but in order for the dough to be used between | |
177 | |
00:20:59,510 --> 00:21:08,390 | |
all the time, these are the data from the test FIG. | |
178 | |
00:21:08,390 --> 00:21:14,120 | |
parameter as the name of s.u. then pass the name of this very simple | |
179 | |
00:21:14,120 --> 00:21:19,400 | |
fixin call the test itself somehow is empty | |
180 | |
00:21:19,400 --> 00:21:30,290 | |
we will check that initially we have an empty queue, you can notice that the idea | |
181 | |
00:21:30,290 --> 00:21:37,910 | |
seeing that the test will use fixer instead of the macro, the test began to use | |
182 | |
00:21:37,910 --> 00:21:46,070 | |
we need a test underscore f so that we have access to the fact that | |
183 | |
00:21:46,070 --> 00:21:52,420 | |
stored in class so here we want | |
184 | |
00:21:52,630 --> 00:22:03,490 | |
check that the queue is empty here | |
185 | |
00:22:03,490 --> 00:22:15,430 | |
run the test we see that it passes | |
186 | |
00:22:17,320 --> 00:22:29,080 | |
add one more court in which it will look how the dec works | |
187 | |
00:22:31,570 --> 00:22:39,710 | |
for this we will store another pointer, also select a certain amount | |
188 | |
00:22:39,710 --> 00:22:50,330 | |
resources and also here it is so formatting everything as well | |
189 | |
00:22:50,330 --> 00:23:05,540 | |
him here especially him here for the second and our turn of the university a screw principle | |
190 | |
00:23:05,540 --> 00:23:13,190 | |
we may need the result in several places so we put this | |
191 | |
00:23:13,190 --> 00:23:27,530 | |
everything in a variable and compare that we forgot or I forgot to put at least | |
192 | |
00:23:27,530 --> 00:23:37,370 | |
something here is the turn we put there unit means and we expect that will return | |
193 | |
00:23:37,370 --> 00:23:50,840 | |
to us, too, she, and in general, in addition to this form, you can check that as | |
194 | |
00:23:50,840 --> 00:23:58,060 | |
argument method called also returns what you need | |
195 | |
00:24:03,200 --> 00:24:11,840 | |
Well, no, he doesn’t return at all because our queue is empty and throws | |
196 | |
00:24:11,840 --> 00:24:19,490 | |
reception therefore here it will be more correct to expect | |
197 | |
00:24:19,490 --> 00:24:32,370 | |
what will throw exception it is necessary to specify what exactly it is out of range | |
198 | |
00:24:32,370 --> 00:24:44,010 | |
and restart the fallen test well now everything is within | |
199 | |
00:24:44,010 --> 00:24:58,680 | |
expected in the script, the execution order I now basically ran one at a time | |
200 | |
00:24:58,680 --> 00:25:21,920 | |
test if all at once I think that they are executed in order only | |
201 | |
00:25:21,920 --> 00:25:36,640 | |
and if there are several, we use them all the time mixing the way | |
202 | |
00:25:36,640 --> 00:25:53,960 | |
dependency yes yes yes but basically the use of a constructor destructor | |
203 | |
00:25:53,960 --> 00:26:16,030 | |
equivalent to the same as we describe the problem until in this case the correct | |
204 | |
00:26:16,030 --> 00:26:25,730 | |
well, let's generate then so that everything is fair and transfer | |
205 | |
00:26:25,730 --> 00:26:31,600 | |
what we want to bring here | |
206 | |
00:26:32,710 --> 00:26:38,440 | |
leave the destructor empty as it is better | |
207 | |
00:26:39,940 --> 00:26:48,430 | |
yes actually a lot of keys to run in the test program exist | |
208 | |
00:26:48,430 --> 00:26:53,930 | |
in the framework I didn’t plan to dive so deeply thank you for | |
209 | |
00:26:53,930 --> 00:27:05,900 | |
prompted, but I’ll run all sorts of water basically, of course, are made from South Africa and | |
210 | |
00:27:05,900 --> 00:27:14,420 | |
for this it is envisaged to launch a separate test as we did the launch of all tests | |
211 | |
00:27:14,420 --> 00:27:21,160 | |
file if you call this action from the context menu or using shortcuts | |
212 | |
00:27:21,160 --> 00:27:31,610 | |
global namespace and there are also configuration wounds which you can | |
213 | |
00:27:31,610 --> 00:27:34,820 | |
define all you they | |
214 | |
00:27:34,820 --> 00:27:38,860 | |
either separately suite or separately tests | |
215 | |
00:27:43,120 --> 00:27:48,789 | |
you can use the pattern as used for example when starting from | |
216 | |
00:27:48,789 --> 00:27:59,120 | |
of the whole file and well, you can just leave the field empty then all all the tests in this | |
217 | |
00:27:59,120 --> 00:28:07,929 | |
bidding will start with us and all sorts of keys and pass the argument program | |
218 | |
00:28:08,080 --> 00:28:13,730 | |
environment variable can also be used in this way | |
219 | |
00:28:13,730 --> 00:28:24,139 | |
there is certainly a parameterization of your work with this | |
220 | |
00:28:24,139 --> 00:28:30,799 | |
There are ways to test behavior, including parameterization | |
221 | |
00:28:30,799 --> 00:28:41,000 | |
type and value is google nokia here I’ll literally briefly show how it | |
222 | |
00:28:41,000 --> 00:28:54,019 | |
Looks like we won’t write anything for so long | |
223 | |
00:28:54,019 --> 00:28:59,779 | |
wrote tests for our queue based on an array and we still got | |
224 | |
00:28:59,779 --> 00:29:06,279 | |
queue based on a list of them in general we want all the same tests but | |
225 | |
00:29:06,279 --> 00:29:13,279 | |
I don’t want to duplicate this. One of the options is to take tests. | |
226 | |
00:29:13,279 --> 00:29:20,110 | |
types offensively and this other queue can be used for this | |
227 | |
00:29:21,009 --> 00:29:27,049 | |
factory default function that will return | |
228 | |
00:29:27,049 --> 00:29:40,009 | |
at the same time, we need to store them in the sixth grade and define the test as a test | |
229 | |
00:29:40,009 --> 00:29:44,360 | |
with a motorized type having such | |
230 | |
00:29:44,360 --> 00:29:53,150 | |
cases need to be registered un and then to establish this business in general in | |
231 | |
00:29:53,150 --> 00:30:00,580 | |
eventually call and see what all this | |
232 | |
00:30:00,580 --> 00:30:07,520 | |
earn and not earn tests were not found because | |
233 | |
00:30:07,520 --> 00:30:15,160 | |
what is not included we have this file assembly | |
234 | |
00:30:36,999 --> 00:30:45,839 | |
Now we see that our test is a set of tests for motorized heat in | |
235 | |
00:30:45,839 --> 00:30:54,039 | |
which here such instance here has two notes in it each for different | |
236 | |
00:30:54,039 --> 00:30:57,939 | |
types and but with the same set of tests that in | |
237 | |
00:30:57,939 --> 00:31:06,599 | |
In principle, as one of the options for work, well, when there is similar functionality | |
238 | |
00:31:08,429 --> 00:31:14,409 | |
there is also such an interesting thing as tests could | |
239 | |
00:31:14,409 --> 00:31:26,259 | |
more precisely google could which allows you to test the behavior of your program we | |
240 | |
00:31:26,259 --> 00:31:31,569 | |
we will include a file with tests and still we need libraries | |
241 | |
00:31:31,569 --> 00:31:39,549 | |
they are in fake libraries in the same way g could we let this one on our own | |
242 | |
00:31:39,549 --> 00:31:42,179 | |
I do not write | |
243 | |
00:31:45,970 --> 00:31:54,220 | |
here and thanks | |
244 | |
00:32:02,700 --> 00:32:09,590 | |
no, well, the test will only slow us down a little bit, I think, but | |
245 | |
00:32:09,590 --> 00:32:16,340 | |
worse not do so google could have good | |
246 | |
00:32:21,020 --> 00:32:31,340 | |
the Perry family generates everything that we added to it completely and here | |
247 | |
00:32:31,340 --> 00:32:39,740 | |
just with the same queue we can check that the call from some | |
248 | |
00:32:39,740 --> 00:32:45,540 | |
client function there client function, it will behave as we expect that | |
249 | |
00:32:45,540 --> 00:32:53,090 | |
she will be called there a certain number of times for this | |
250 | |
00:32:53,690 --> 00:33:03,840 | |
write something in the style of expect count pass there our makovsky object from | |
251 | |
00:33:03,840 --> 00:33:11,160 | |
inheritance from the queue to say that we are interested in how many times the method is called | |
252 | |
00:33:11,160 --> 00:33:16,740 | |
says and expect that | |
253 | |
00:33:16,740 --> 00:33:24,140 | |
he will be called at least 1 time | |
254 | |
00:33:31,010 --> 00:33:37,370 | |
in principle, once this method should be called well, but in principle it looks | |
255 | |
00:33:37,370 --> 00:33:48,260 | |
it's about the same in general on this my brief review came to an end if you | |
256 | |
00:33:48,260 --> 00:33:50,950 | |
have any questions | |
257 | |
00:33:53,770 --> 00:34:03,980 | |
gray line itself no present make do not want yes well ok break | |
258 | |
00:34:03,980 --> 00:34:08,469 | |
I can tell you how to make the next release | |
259 | |
00:34:08,469 --> 00:34:15,678 | |
we need to tell this very clearly I am no no no questions just | |
260 | |
00:34:15,679 --> 00:34:19,240 | |
met everything there in public | |
261 | |
00:34:31,219 --> 00:34:38,229 | |
because it gives you generally plan to provide | |
262 | |
00:34:38,230 --> 00:34:47,590 | |
the ability to do it yourself, or you could set up a small batch | |
263 | |
00:34:48,440 --> 00:34:55,949 | |
Well, the users themselves are more likely not yet able to even say that it | |
264 | |
00:34:55,949 --> 00:35:01,260 | |
will it ever be unlikely to support other frameworks yes we | |
265 | |
00:35:01,260 --> 00:35:05,849 | |
there are some requests just at the moment somewhere here since November with | |
266 | |
00:35:05,849 --> 00:35:12,119 | |
version 12 we support google tests as the most popular and it is on | |
267 | |
00:35:12,119 --> 00:35:16,559 | |
users there because they voted for it he by a wide margin | |
268 | |
00:35:16,559 --> 00:35:21,750 | |
comes from others, that is, if it is clear that there is still some very popular | |
269 | |
00:35:21,750 --> 00:35:29,819 | |
alternative of course we integrate and with this the moment is not something | |
270 | |
00:35:29,819 --> 00:35:54,900 | |
specific franks well understand software generation | |
271 | |
00:35:54,900 --> 00:36:09,410 | |
all reports with all the test as far as I remember it is a little different order | |
272 | |
00:36:09,410 --> 00:36:14,579 | |
the thing is that it is on the family itself support that is, it is not such a framework | |
273 | |
00:36:14,579 --> 00:36:20,309 | |
well, I'm not ready to talk later, maybe we already have | |
274 | |
00:36:20,309 --> 00:36:24,290 | |
the ability to work with him in some form | |
275 | |
00:36:28,520 --> 00:36:47,340 | |
support already exists yes yes yes yes yes by force it is not yet as open as an idea in | |
276 | |
00:36:47,340 --> 00:36:51,840 | |
in this sense, well, maybe we'll someday come to this that we give | |
277 | |
00:36:51,840 --> 00:36:56,660 | |
on outsourcing things like that | |
278 | |
00:37:00,440 --> 00:37:05,610 | |
not at the moment but how to say i met i met users | |
279 | |
00:37:05,610 --> 00:37:12,630 | |
who did it in some way but but no officially and pia and nothing | |
280 | |
00:37:12,630 --> 00:37:55,500 | |
there is no such yes and for what purpose do you hear this is great actually yes we | |
281 | |
00:37:55,500 --> 00:38:00,990 | |
faced with cases such as custom protein systems and everything custom | |
282 | |
00:38:00,990 --> 00:38:07,230 | |
Yes indeed, for such cases, of course, plugins are the best but in | |
283 | |
00:38:07,230 --> 00:38:12,330 | |
in some form we are trying to meet in this sense, well, just for now | |
284 | |
00:38:12,330 --> 00:38:16,170 | |
you can’t say that you can come and this is how ideas to write a plugin | |
285 | |
00:38:16,170 --> 00:38:26,930 | |
I think something with this should change in the near future and he’s a joke | |
286 | |
00:38:31,550 --> 00:38:37,830 | |
no, of course she is on the intel platform of the Edge idea, that is, she has the whole common team | |
287 | |
00:38:37,830 --> 00:39:01,410 | |
separate well in what in some ways are similar in something there is no part until part does not fit | |
288 | |
00:39:01,410 --> 00:39:06,480 | |
there is, but for this we need to perform some actions, we really | |
289 | |
00:39:06,480 --> 00:39:12,210 | |
here we have a brand release planned and we already have a lot of plans for the near future | |
290 | |
00:39:12,210 --> 00:39:17,670 | |
time because I want to implement it, I can’t say that support | |
291 | |
00:39:17,670 --> 00:39:24,990 | |
I’m right on top of the plugins, but I’ve come to us with this one now, I think I don’t know | |
292 | |
00:39:24,990 --> 00:39:28,640 | |
really someone to do something about it | |
293 | |
00:39:28,730 --> 00:39:57,750 | |
want to contact us but there is no version control system common between them yes yes in | |
294 | |
00:39:57,750 --> 00:40:03,440 | |
basically, of course, everything concerns and and it’s basically general | |
295 | |
00:40:11,310 --> 00:40:30,130 | |
I recall looking for a house 1 release version discussed, we are one such thing | |
296 | |
00:40:30,130 --> 00:40:50,200 | |
generation up and in general there will someday be something else on which | |
297 | |
00:40:50,200 --> 00:40:54,970 | |
the question is such an answer, but in the first place most likely it has gone astray so it will not be | |
298 | |
00:40:54,970 --> 00:40:58,600 | |
kumeyko, I think there is an open source community | |
299 | |
00:40:58,600 --> 00:41:03,810 | |
actively vote for t-shirt files we all think this way | |
300 | |
00:41:03,810 --> 00:41:08,170 | |
it seems pointless to me here a corner of lovers on their own something | |
301 | |
00:41:08,170 --> 00:41:11,280 | |
write support | |
302 | |
00:41:40,340 --> 00:41:46,740 | |
there is no support for families in android studio about why in android studio there is no support | |
303 | |
00:41:46,740 --> 00:41:51,600 | |
I don’t know any families like I think they have their own design decisions there | |
304 | |
00:41:51,600 --> 00:42:06,380 | |
about support, well, for some reason they decided so Samga | |
305 | |
00:42:06,380 --> 00:42:14,280 | |
Well, it's hard to call that they will be a counter to us, but in general I do not know them | |
306 | |
00:42:14,280 --> 00:42:35,880 | |
they explained the solution to me, in principle, multifunctionality is written as | |
307 | |
00:42:35,880 --> 00:42:42,840 | |
in a way and apparently you are also interested in some other | |
308 | |
00:42:42,840 --> 00:42:49,980 | |
framework yes yes by the way teams decide very requested to say that they | |
309 | |
00:42:49,980 --> 00:42:56,250 | |
also google test support so if you use studio and rich peer | |
310 | |
00:42:56,250 --> 00:43:08,870 | |
then with google tests you format there too | |
311 | |
00:43:12,599 --> 00:43:20,980 | |
there are no third-party Tulu but everything is quite customizable, that is, the transfer of some | |
312 | |
00:43:20,980 --> 00:43:42,009 | |
settings are interested in formatting or what is used I probably did not understand | |
313 | |
00:43:42,009 --> 00:43:55,960 | |
There is no question of formatting the code like this, so it simply can’t be on this topic | |
314 | |
00:43:55,960 --> 00:44:00,819 | |
you might think how to dodge and do it well, in general, simple | |
315 | |
00:44:00,819 --> 00:44:05,079 | |
some kind of mechanisms no, we focus on the fact that the user sets the scheme | |
316 | |
00:44:05,079 --> 00:44:09,759 | |
formatting itself there is quite large with a list of standard schemes | |
317 | |
00:44:09,759 --> 00:44:14,349 | |
there is for formatting the code, that is, we somehow go this way as far as I | |
318 | |
00:44:14,349 --> 00:44:18,819 | |
I remember there you can export and import these settings so | |
319 | |
00:44:18,819 --> 00:44:21,240 | |
way | |
320 | |
00:44:43,930 --> 00:44:52,580 | |
mazda that maybe this is not the food of the imperials and accordingly giving it may be | |
321 | |
00:44:52,580 --> 00:44:58,280 | |
it is fraught with the fact that then, regardless of how much you master, it will write that this | |
322 | |
00:44:58,280 --> 00:45:07,790 | |
operation here i made simple it was launched your genetically minutes i am i | |
323 | |
00:45:07,790 --> 00:45:16,360 | |
I hate that we ourselves for ours | |
324 | |
00:45:19,870 --> 00:45:22,870 | |
strategic | |
325 | |
00:45:40,540 --> 00:45:45,410 | |
actively because the two most popular evening quests | |
326 | |
00:45:45,410 --> 00:45:54,130 | |
this is support repair debug and launch and everything else for the Ministry of Internal Affairs and yes | |
327 | |
00:45:54,130 --> 00:46:01,910 | |
Well, we have their file that I already called, but I want to understand of course, so to speak | |
328 | |
00:46:01,910 --> 00:46:06,800 | |
Jurassic of the people who want it, what exactly is needed, how much is it | |
329 | |
00:46:06,800 --> 00:46:11,480 | |
really because we suppose great-grandfather support the GTZ and clank compilers there | |
330 | |
00:46:11,480 --> 00:46:16,260 | |
and we don’t support any tricky compilers | |
331 | |
00:46:16,260 --> 00:46:21,450 | |
worthy of water all for customizing just need to connect exactly the right | |
332 | |
00:46:21,450 --> 00:46:33,150 | |
the compiler you work direct evil eye is as they are as independent | |
333 | |
00:46:33,150 --> 00:46:36,740 | |
programs need to have | |
334 | |
00:46:37,400 --> 00:46:44,130 | |
Yes, of course, to connect sciences, but with each debugger, and we say such a tool | |
335 | |
00:46:44,130 --> 00:46:48,450 | |
you need to be able to work, you need to show it will come out and a number of how we walk around the code and that's it | |
336 | |
00:46:48,450 --> 00:47:23,240 | |
this looks where but for using | |
337 | |
00:47:26,510 --> 00:47:30,870 | |
well at the moment there is no such functionality is not supported that is | |
338 | |
00:47:30,870 --> 00:47:36,870 | |
but to sit on the desk and wait clearly yes to support debug on | |
339 | |
00:47:36,870 --> 00:47:40,800 | |
remote platform, well, it’s clear that it will be slower before the debugger, in principle | |
340 | |
00:47:40,800 --> 00:47:44,970 | |
happens slow depending on what kind of program code you have there and that's it | |
341 | |
00:47:44,970 --> 00:47:52,410 | |
that is, well, so far there is no understanding of how to do it quickly simply and immediately | |
342 | |
00:47:52,410 --> 00:47:58,890 | |
give it to everyone to use, but they are actively asking us, but probably something in | |
343 | |
00:47:58,890 --> 00:48:02,610 | |
In general, we are looking in this direction. The question was whether we are looking in this direction. Yes, we | |
344 | |
00:48:02,610 --> 00:48:08,220 | |
actively looking in this direction by the way we are looking for a person to debugger to us in | |
345 | |
00:48:08,220 --> 00:48:10,370 | |
the team | |
346 | |
00:48:15,460 --> 00:48:20,510 | |
in fact, I can generalize that it’s not very convenient to configure | |
347 | |
00:48:20,510 --> 00:48:26,410 | |
several beams are used during assembly each time and | |
348 | |
00:48:26,410 --> 00:48:32,800 | |
deep inside the actions have parameters passed on to families and every time | |
349 | |
00:48:32,800 --> 00:48:38,540 | |
regenerate here a very large project I would like to first prepare | |
350 | |
00:48:38,540 --> 00:48:48,080 | |
several types of raincoats is a new debugger compilers fast as | |
351 | |
00:48:48,080 --> 00:48:54,260 | |
made in Korea, well, comparison with qt creator and there, as it were | |
352 | |
00:48:54,260 --> 00:49:00,670 | |
as far as I know the functionality nickname works a little differently and is arranged yes | |
353 | |
00:49:00,670 --> 00:49:09,410 | |
Well, understandable, but we still need to somehow collect information from the compiler | |
354 | |
00:49:09,410 --> 00:49:13,040 | |
to build characters that is, it takes some time and reference | |
355 | |
00:49:13,040 --> 00:49:24,830 | |
as you say a large project to work correctly with it is necessary but | |
356 | |
00:49:24,830 --> 00:49:30,260 | |
usually we offer all the same it does with the help of the build system all of us | |
357 | |
00:49:30,260 --> 00:49:44,120 | |
with the help of the family, basically yes yes but there is an opportunity to pass them no but if | |
358 | |
00:49:44,120 --> 00:49:49,460 | |
there are some kind of questions it seems to me we can talk here is not a report in | |
359 | |
00:49:49,460 --> 00:49:55,760 | |
a break on the topic of how that with configure the in any case | |
360 | |
00:49:55,760 --> 00:50:00,369 | |
reported any other questions yeah | |
361 | |
00:50:00,369 --> 00:50:07,019 | |
invite all these places there tuned in well you yourself | |
362 | |
00:50:14,460 --> 00:50:21,790 | |
will fill the server with operations, but as for integration with the build server, I will honestly say | |
363 | |
00:50:21,790 --> 00:50:25,440 | |
I didn’t think about it | |
364 | |
00:50:28,810 --> 00:50:31,380 | |
parameters | |
365 | |
00:50:33,910 --> 00:50:38,060 | |
There is no problem in saving the parameters. | |
366 | |
00:50:38,060 --> 00:50:45,440 | |
TOS with what settings they started all this if it is about this | |
367 | |
00:50:45,440 --> 00:50:53,330 | |
stored in the form of our files that pass there is such a hidden directory. | |
368 | |
00:50:53,330 --> 00:51:09,860 | |
an idea, that is, but this is an interesting case, but I’m not ready to say it now, we’re not | |
369 | |
00:51:09,860 --> 00:51:15,700 | |
examined such a combination to be honest somehow | |
370 | |
00:51:16,870 --> 00:51:19,870 | |
thank | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment