Mercurial > vim
comparison src/message_test.c @ 18931:80b40bd5ec1a v8.2.0026
patch 8.2.0026: still some /* */ comments
Commit: https://github.com/vim/vim/commit/85a2002adb0eda9a9309c2fab4a79edaa91fb834
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 21 18:25:54 2019 +0100
patch 8.2.0026: still some /* */ comments
Problem: Still some /* */ comments.
Solution: Convert to // comments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 21 Dec 2019 18:30:05 +0100 |
parents | b254fd46ef62 |
children | 6fb11e7fb9cd |
comparison
equal
deleted
inserted
replaced
18930:394f34c5c683 | 18931:80b40bd5ec1a |
---|---|
12 */ | 12 */ |
13 | 13 |
14 #undef NDEBUG | 14 #undef NDEBUG |
15 #include <assert.h> | 15 #include <assert.h> |
16 | 16 |
17 /* Must include main.c because it contains much more than just main() */ | 17 // Must include main.c because it contains much more than just main() |
18 #define NO_VIM_MAIN | 18 #define NO_VIM_MAIN |
19 #include "main.c" | 19 #include "main.c" |
20 | 20 |
21 /* This file has to be included because some of the tested functions are | 21 // This file has to be included because some of the tested functions are |
22 * static. */ | 22 // static. |
23 #include "message.c" | 23 #include "message.c" |
24 | 24 |
25 /* | 25 /* |
26 * Test trunc_string(). | 26 * Test trunc_string(). |
27 */ | 27 */ |
29 test_trunc_string(void) | 29 test_trunc_string(void) |
30 { | 30 { |
31 char_u *buf; /*allocated every time to find uninit errors */ | 31 char_u *buf; /*allocated every time to find uninit errors */ |
32 char_u *s; | 32 char_u *s; |
33 | 33 |
34 /* in place */ | 34 // in place |
35 buf = alloc(40); | 35 buf = alloc(40); |
36 STRCPY(buf, "text"); | 36 STRCPY(buf, "text"); |
37 trunc_string(buf, buf, 20, 40); | 37 trunc_string(buf, buf, 20, 40); |
38 assert(STRCMP(buf, "text") == 0); | 38 assert(STRCMP(buf, "text") == 0); |
39 vim_free(buf); | 39 vim_free(buf); |
54 STRCPY(buf, "a text that nott fits"); | 54 STRCPY(buf, "a text that nott fits"); |
55 trunc_string(buf, buf, 20, 40); | 55 trunc_string(buf, buf, 20, 40); |
56 assert(STRCMP(buf, "a text t...nott fits") == 0); | 56 assert(STRCMP(buf, "a text t...nott fits") == 0); |
57 vim_free(buf); | 57 vim_free(buf); |
58 | 58 |
59 /* copy from string to buf */ | 59 // copy from string to buf |
60 buf = alloc(40); | 60 buf = alloc(40); |
61 s = vim_strsave((char_u *)"text"); | 61 s = vim_strsave((char_u *)"text"); |
62 trunc_string(s, buf, 20, 40); | 62 trunc_string(s, buf, 20, 40); |
63 assert(STRCMP(buf, "text") == 0); | 63 assert(STRCMP(buf, "text") == 0); |
64 vim_free(buf); | 64 vim_free(buf); |