chore: add http stdlib, thread-safe token rwlock, and dynamic array bounds in interpreter
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -O2 -Isrc
|
||||
CFLAGS = -Wall -Wextra -O2 -Isrc -mcmodel=medium
|
||||
LDFLAGS = -lm -lpthread
|
||||
|
||||
SRC_DIR = src
|
||||
@@ -28,7 +28,8 @@ SOURCES = $(SRC_DIR)/main.c \
|
||||
$(SRC_DIR)/stdlib/io/socket_stdlib.c \
|
||||
$(SRC_DIR)/stdlib/async/async_stdlib.c \
|
||||
$(SRC_DIR)/stdlib/constants/constants_stdlib.c \
|
||||
$(SRC_DIR)/stdlib/eval/eval_stdlib.c
|
||||
$(SRC_DIR)/stdlib/eval/eval_stdlib.c \
|
||||
$(SRC_DIR)/stdlib/http/http_stdlib.c
|
||||
|
||||
OBJECTS = $(SOURCES:$(SRC_DIR)/%.c=$(BUILD_DIR)/%.o)
|
||||
|
||||
@@ -61,6 +62,7 @@ dirs:
|
||||
@mkdir -p $(BUILD_DIR)/stdlib/async
|
||||
@mkdir -p $(BUILD_DIR)/stdlib/constants
|
||||
@mkdir -p $(BUILD_DIR)/stdlib/eval
|
||||
@mkdir -p $(BUILD_DIR)/stdlib/http
|
||||
|
||||
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
@@ -77,31 +79,34 @@ test: $(TARGET)
|
||||
@echo " RC LANGUAGE - COMPREHENSIVE TEST SUITE"
|
||||
@echo "================================================================"
|
||||
@echo ""
|
||||
@echo "[1/9] Running Language Features Tests..."
|
||||
@echo "[1/10] Running Language Features Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_language_features.rc
|
||||
@echo ""
|
||||
@echo "[2/9] Running String Standard Library Tests..."
|
||||
@echo "[2/10] Running String Standard Library Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_stdlib_string.rc
|
||||
@echo ""
|
||||
@echo "[3/9] Running Math Standard Library Tests..."
|
||||
@echo "[3/10] Running Math Standard Library Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_stdlib_math.rc
|
||||
@echo ""
|
||||
@echo "[4/9] Running I/O Standard Library Tests..."
|
||||
@echo "[4/10] Running I/O Standard Library Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_stdlib_io.rc
|
||||
@echo ""
|
||||
@echo "[5/9] Running Async Standard Library Tests..."
|
||||
@echo "[5/10] Running HTTP Standard Library Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_stdlib_http.rc
|
||||
@echo ""
|
||||
@echo "[6/10] Running Async Standard Library Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_stdlib_async.rc
|
||||
@echo ""
|
||||
@echo "[6/9] Running OOP Features Tests..."
|
||||
@echo "[7/10] Running OOP Features Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_oop.rc
|
||||
@echo ""
|
||||
@echo "[7/9] Running Preprocessor Tests..."
|
||||
@echo "[8/10] Running Preprocessor Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_preprocessor.rc
|
||||
@echo ""
|
||||
@echo "[8/9] Running Eval Function Tests..."
|
||||
@echo "[9/10] Running Eval Function Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_eval.rc
|
||||
@echo ""
|
||||
@echo "[9/9] Running Input Validation Tests..."
|
||||
@echo "[10/10] Running Input Validation Tests..."
|
||||
@$(TARGET) $(TEST_DIR)/test_input_validation.rc
|
||||
@echo ""
|
||||
@echo "================================================================"
|
||||
@@ -138,6 +143,9 @@ test-eval: $(TARGET)
|
||||
test-validation: $(TARGET)
|
||||
$(TARGET) $(TEST_DIR)/test_input_validation.rc
|
||||
|
||||
test-http: $(TARGET)
|
||||
$(TARGET) $(TEST_DIR)/test_stdlib_http.rc
|
||||
|
||||
test-robustness: $(TARGET)
|
||||
$(TARGET) $(TEST_DIR)/test_robustness.rc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user