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

Diff of /lbbs/src/test_section_list.c

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

Revision 1.15 by sysadm, Fri May 23 10:45:54 2025 UTC Revision 1.16 by sysadm, Fri May 23 11:05:44 2025 UTC
# Line 586  int main(int argc, char *argv[]) Line 586  int main(int argc, char *argv[])
586          {          {
587                  section_first_aid = p_section[i]->p_article_head->aid;                  section_first_aid = p_section[i]->p_article_head->aid;
588    
589                  for (j = 0; j < group_count; j++)                  for (j = 0; j < group_count; j += 2)
590                  {                  {
591                          p_article = section_list_find_article_with_offset(p_section[i], section_first_aid + j, &page, &offset, &p_next);                          p_article = section_list_find_article_with_offset(p_section[i], section_first_aid + j, &page, &offset, &p_next);
592                          if (p_article == NULL)                          if (p_article == NULL)
# Line 595  int main(int argc, char *argv[]) Line 595  int main(int argc, char *argv[])
595                                             section_first_aid + j, i);                                             section_first_aid + j, i);
596                                  break;                                  break;
597                          }                          }
598    
599                            if (section_list_set_article_visible(p_section[i], p_article->aid, 0) != BBS_article_limit_per_section / group_count)
600                            {
601                                    printf("section_list_set_article_visible(aid = %d) error\n", p_article->aid);
602                            }
603                  }                  }
604          }          }
605    
# Line 631  int main(int argc, char *argv[]) Line 636  int main(int argc, char *argv[])
636                          break;                          break;
637                  }                  }
638    
639                    if (p_section[i]->visible_topic_count != (i < section_count / 2 ? 0 : group_count / 2))
640                    {
641                            printf("Visible topic count error in section %d, %d != %d\n", i,
642                                       p_section[i]->visible_topic_count, (i < section_count / 2 ? 0 : group_count / 2));
643                            break;
644                    }
645    
646                  if (p_section[i]->article_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section))                  if (p_section[i]->article_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section))
647                  {                  {
648                          printf("Article count error in section %d, %d != %d\n", i,                          printf("Article count error in section %d, %d != %d\n", i,
# Line 638  int main(int argc, char *argv[]) Line 650  int main(int argc, char *argv[])
650                          break;                          break;
651                  }                  }
652    
653                  if (p_section[i]->page_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section / BBS_article_limit_per_page))                  if (p_section[i]->visible_article_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2))
654                    {
655                            printf("Visible article count error in section %d, %d != %d\n", i,
656                                       p_section[i]->visible_article_count, (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2));
657                            break;
658                    }
659    
660                    if (p_section[i]->page_count != (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2 / BBS_article_limit_per_page))
661                  {                  {
662                          printf("Page count error in section %d, %d != %d\n", i,                          printf("Page count error in section %d, %d != %d\n", i,
663                                     p_section[i]->page_count, (i < section_count / 2 ? 0 : BBS_article_limit_per_section / BBS_article_limit_per_page));                                     p_section[i]->page_count, (i < section_count / 2 ? 0 : BBS_article_limit_per_section / 2 / BBS_article_limit_per_page));
664                          break;                          break;
665                  }                  }
666          }          }


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

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