{"id":3004,"date":"2012-11-20T07:29:39","date_gmt":"2012-11-20T07:29:39","guid":{"rendered":"http:\/\/ddolgi.pe.kr\/blog\/index.php\/2012\/11\/20\/%ec%8b%a4%ec%9a%a9%ec%a3%bc%ec%9d%98-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%a8%b8%eb%a5%bc-%ec%9d%bd%ea%b3%a0\/"},"modified":"2012-11-20T07:29:39","modified_gmt":"2012-11-20T07:29:39","slug":"%ec%8b%a4%ec%9a%a9%ec%a3%bc%ec%9d%98-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%a8%b8%eb%a5%bc-%ec%9d%bd%ea%b3%a0","status":"publish","type":"post","link":"http:\/\/ddolgi.pe.kr\/blog\/archives\/3004","title":{"rendered":"&#8216;\uc2e4\uc6a9\uc8fc\uc758 \ud504\ub85c\uadf8\ub798\uba38&#8217;\ub97c \uc77d\uace0&#8230;"},"content":{"rendered":"<p>\uacf5\ubd80 \uc880 \ud558\ub824\uace0 \uc9d1\uc5b4 \ub4e4\uc5c8\ub2e4.<\/p>\n<p>70\uac00\uc9c0 Tip\uc744 \uc9da\uc5b4\uc8fc\ub354\ub77c. \ub2e4 \uae30\uc5b5\ud558\uae30\uc5d4 \ub108\ubb34 \ub9ce\uace0,<\/p>\n<p>\uc811\uc5b4 \ub193\ub294 \uac8c&#8230; \uc5b4\ub514 \ubcf4\uc790.<\/p>\n<p><\/p>\n<ul style=\"list-style-type: disc;\">\n<li>\ub9dd\uce58\uc9c0 \ub9d0\uace0 \uba48\ucd94\ub77c<\/li>\n<\/ul>\n<div class=\"txc-textbox\" style=\"border: 1px dashed rgb(243, 197, 52); background-color: rgb(254, 254, 184); padding: 10px;\">\n<div>#define CHECK(LINE, EXPECTED )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; \\<\/div>\n<div style=\"margin-left: 2em;\">{&nbsp;&nbsp;&nbsp;&nbsp;int rc = LINE;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; \\<\/div>\n<div style=\"margin-left: 4em;\">if (rc != EXPECTED)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; \\<\/div>\n<div style=\"margin-left: 6em;\">ut_abort(__FILE__, __LINE__, #LINE, rc, EXPECTED ); }<\/div>\n<div>void ut_abort(char *file, int ln, char *line, int rc, int exp) {<\/div>\n<div style=\"margin-left: 2em;\">fprintf(stderr, &#8220;%s line %d\\n&#8217;%s&#8217; : expected %d, get %d\\n&#8221;, file, ln, line, exp, rc);<\/div>\n<div style=\"margin-left: 2em;\">exit(1);<\/div>\n<div>}<\/div>\n<div><\/div>\n<div>&#8230;<\/div>\n<div>CHECK(stat(&#8220;\/temp&#8221;, &amp;stat_buff), 0);<\/div>\n<div>&#8230;<\/div>\n<\/div>\n<p><\/p>\n<ul style=\"list-style-type: disc;\">\n<li>Refactoring Tips<\/li>\n<ul style=\"list-style-type: disc;\">\n<li>\uae30\ub2a5 \ucd94\uac00\uc640 \ubcd1\ud589\ud558\uc9c0 \uc54a\ub294\ub2e4.<\/li>\n<li>\uc218\uc2dc\ub85c \ud14c\uc2a4\ud2b8\ud55c\ub2e4.<\/li>\n<li>\uc791\uac8c \ub098\ub204\uc5b4 \uc2e4\uc2dc\ud55c\ub2e4.<\/li>\n<\/ul>\n<\/ul>\n<div><\/div>\n<ul style=\"list-style-type: disc;\">\n<li>\uc544\ubb34\ub9ac \ud750\ub9b0 \uba39\ubb3c\uc774\ub77c\ub3c4 \uac00\uc7a5 \ud6cc\ub96d\ud55c \uae30\uc5b5\ub825\ubcf4\ub2e4 \ub0ab\ub2e4.<\/li>\n<ul style=\"list-style-type: disc;\">\n<li>\ud544\uc694\ud55c \uc8fc\uc11d: \uc124\uba85, \uc778\uc790, \ubc18\ud658<\/li>\n<li>\ubd88\ud544\uc694 \uc8fc\uc11d: \uc5f0\uacb0 \ud30c\uc77c, \uc218\uc815 \uae30\ub85d, \ud30c\uc77c \uc774\ub984<\/li>\n<\/ul>\n<\/ul>\n<div><\/div>\n<div>&nbsp;xUnit\uc774\ub77c\ub294 \uac8c \uc18c\uac1c\ub418\uc5b4 \uc788\ub358\ub370&#8230; \uacf5\ubd80\ud574\ubd10?<\/div>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uacf5\ubd80 \uc880 \ud558\ub824\uace0 \uc9d1\uc5b4 \ub4e4\uc5c8\ub2e4. 70\uac00\uc9c0 Tip\uc744 \uc9da\uc5b4\uc8fc\ub354\ub77c. \ub2e4 \uae30\uc5b5\ud558\uae30\uc5d4 \ub108\ubb34 \ub9ce\uace0, \uc811\uc5b4 \ub193\ub294 \uac8c&#8230; \uc5b4\ub514 \ubcf4\uc790. \ub9dd\uce58\uc9c0 \ub9d0\uace0 \uba48\ucd94\ub77c #define CHECK(LINE, EXPECTED )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; \\ {&nbsp;&nbsp;&nbsp;&nbsp;int rc = LINE;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; \\ if (rc != EXPECTED)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; \\ ut_abort(__FILE__, __LINE__, #LINE, rc, EXPECTED ); } void ut_abort(char *file, int ln, char *line, int rc, int [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[57,281],"class_list":["post-3004","post","type-post","status-publish","format-standard","hentry","category-3","tag-57","tag-281"],"_links":{"self":[{"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/posts\/3004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/comments?post=3004"}],"version-history":[{"count":0,"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/posts\/3004\/revisions"}],"wp:attachment":[{"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/media?parent=3004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/categories?post=3004"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ddolgi.pe.kr\/blog\/wp-json\/wp\/v2\/tags?post=3004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}