Przeglądaj źródła

ft: 测试代码添加

master
lijie 2 lat temu
rodzic
commit
61ac8ef2bb
1 zmienionych plików z 27 dodań i 0 usunięć
  1. +27
    -0
      src/testCase/utTpfm.erl

+ 27
- 0
src/testCase/utTpfm.erl Wyświetl plik

@ -649,4 +649,31 @@ loop() ->
loop()
end.
td1(List) ->
[{One, One, One, One} || One <- List],
ok.
td2(List) ->
[{One, One, One, One} || One <- List].
forL(0, L) ->
ok;
forL(Index, L) ->
lists:nth(Index, L),
forL(Index - 1, L).
forL(0, _L, _) ->
ok;
forL(Index, L, _) ->
V = lists:nth(Index, L),
forL(Index - 1, L, V).
forB(0, _B, _) ->
ok;
forB(Index, B, _) ->
BIndex = Index * 3,
<<_:BIndex/bits, V:3, _/bits>> = B,
forB(Index - 1, B, V).

Ładowanie…
Anuluj
Zapisz