/[LeafOK_CVS]/lbbs/src/test_article_view_log.c
ViewVC logotype

Diff of /lbbs/src/test_article_view_log.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Sat Jun 7 08:07:07 2025 UTC Revision 1.5 by sysadm, Tue Nov 4 14:58:56 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                    test_article_view_log.c  -  description  /*
3                                                           -------------------   * test_article_view_log
4          Copyright            : (C) 2004-2025 by Leaflet   *   - tester for data persistence and query of article view log
5          Email                : leaflet@leafok.com   *
6   ***************************************************************************/   * Copyright (C) 2004-2025  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_view_log.h"  #include "article_view_log.h"
10  #include <stdio.h>  #include <stdio.h>
# Line 25  int main(int argc, char *argv[]) Line 17  int main(int argc, char *argv[])
17    
18          article_view_log_load(0, &view_log, 0);          article_view_log_load(0, &view_log, 0);
19    
20          for (i = MAX_AID_INC_CNT * 3; i > 0; i--)          for (i = MAX_VIEWED_AID_INC_CNT * 3; i > 0; i--)
21          {          {
22                  if (i % MAX_AID_INC_CNT == 0 || i % MAX_AID_INC_CNT == MAX_AID_INC_CNT / 2)                  if (i % MAX_VIEWED_AID_INC_CNT == 0 || i % MAX_VIEWED_AID_INC_CNT == MAX_VIEWED_AID_INC_CNT / 2)
23                  {                  {
24                          printf("Base cnt = %d, Inc cnt = %d\n", view_log.aid_base_cnt, view_log.aid_inc_cnt);                          printf("Base cnt = %d, Inc cnt = %d\n", view_log.aid_base_cnt, view_log.aid_inc_cnt);
25                  }                  }
# Line 48  int main(int argc, char *argv[]) Line 40  int main(int argc, char *argv[])
40          printf("Base cnt = %d, Inc cnt = %d\n", view_log.aid_base_cnt, view_log.aid_inc_cnt);          printf("Base cnt = %d, Inc cnt = %d\n", view_log.aid_base_cnt, view_log.aid_inc_cnt);
41    
42          article_view_log_unload(&view_log);          article_view_log_unload(&view_log);
43            
44          return 0;          return 0;
45  }  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1