Changeset 4853


Ignore:
Timestamp:
12/08/08 09:09:02 (4 years ago)
Author:
tick
Message:

opkg: active_list tests

Location:
trunk/src/target/opkg
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/opkg/libopkg/active_list.h

    r4852 r4853  
    2626    char walked; 
    2727    struct active_list *depended; 
    28 }  __attribute__((packed)); 
     28}; 
    2929 
    3030struct active_list * active_list_next(struct active_list *head, struct active_list *ptr); 
  • trunk/src/target/opkg/tests/Makefile.am

    r4428 r4853  
    22 
    33#noinst_PROGRAMS = opkg_hash_test opkg_extract_test 
    4 noinst_PROGRAMS = libopkg_test 
     4noinst_PROGRAMS = libopkg_test opkg_active_list_test 
    55 
    66#opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la 
     
    1212#opkg_extract_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir) 
    1313 
     14opkg_active_list_test_LDADD = $(top_builddir)/libopkg/active_list.o 
     15opkg_active_list_test_SOURCES = opkg_active_list_test.c 
     16opkg_active_list_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir) 
     17 
    1418libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.la 
    1519libopkg_test_SOURCE = libopkg_test.c 
  • trunk/src/target/opkg/tests/opkg_active_list_test.c

    r4852 r4853  
     1/* opkg_active_list.c - the opkg package management system 
    12 
    2 /* 
    3 ïŒŽ--A---B----C----D-----E----F 
    4     |             |__k---L 
    5     |                    |_ N 
    6     |__ G ---H ---I---J 
    7              |_M      |_O 
     3   Tick Chen <tick@openmoko.com> 
    84 
    9 Then the sequence will be  
    10 G M H I O J A B K N L C D E F 
     5   Copyright (C) 2008 Openmoko 
     6 
     7   This program is free software; you can redistribute it and/or 
     8   modify it under the terms of the GNU General Public License as 
     9   published by the Free Software Foundation; either version 2, or (at 
     10   your option) any later version. 
     11 
     12   This program is distributed in the hope that it will be useful, but 
     13   WITHOUT ANY WARRANTY; without even the implied warranty of 
     14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15   General Public License for more details. 
    1116*/ 
     17 
    1218 
    1319#include <stdlib.h> 
    1420#include <libopkg/active_list.h> 
     21#include <active_list.h> 
    1522#include <stdio.h> 
    1623 
     
    1825    char *str; 
    1926    struct active_list list; 
    20 } __attribute__((packed)); 
     27}; 
    2128 
    2229struct active_test *active_test_new(char *str) { 
     
    3441} 
    3542 
     43/* 
     44--A---B----C----D-----E----F 
     45    |             |__k---L 
     46    |                    |_ N 
     47    |__ G ---H ---I---J 
     48             |_M      |_O 
     49 
     50Then the sequence will be  
     51G M H I O J A B K N L C D E F 
     52*/ 
    3653void make_list(struct active_list *head) { 
    3754    struct active_test *A = active_test_new("A"); 
Note: See TracChangeset for help on using the changeset viewer.