| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
test_article_favor.c - description |
/* |
| 3 |
------------------- |
* test_article_favor |
| 4 |
Copyright : (C) 2004-2025 by Leaflet |
* - tester for data model and basic operations of user favorite articles |
| 5 |
Email : leaflet@leafok.com |
* |
| 6 |
***************************************************************************/ |
* Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
|
/*************************************************************************** |
|
|
* * |
|
|
* This program is free software; you can redistribute it and/or modify * |
|
|
* it under the terms of the GNU General Public License as published by * |
|
|
* the Free Software Foundation; either version 3 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 8 |
|
|
| 9 |
#include "article_favor.h" |
#include "article_favor.h" |
| 10 |
#include <stdio.h> |
#include <stdio.h> |
| 106 |
} |
} |
| 107 |
|
|
| 108 |
aid = i * 5 + 7; |
aid = i * 5 + 7; |
| 109 |
|
if (article_favor_check(aid, &favor) != 1) |
| 110 |
|
{ |
| 111 |
|
printf("article_favor_check(%d) != 1\n", aid); |
| 112 |
|
break; |
| 113 |
|
} |
| 114 |
|
|
| 115 |
if (article_favor_set(aid, &favor, 1) != 0) |
if (article_favor_set(aid, &favor, 1) != 0) |
| 116 |
{ |
{ |
| 117 |
printf("article_favor_set(%d, 1) != 0\n", aid); |
printf("article_favor_set(%d, 1) != 0\n", aid); |